Skip to content

Commit

Permalink
Move addTask after signals connect
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 committed Jul 30, 2021
1 parent 5d24096 commit 780adde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/externalstorage/qgssimplecopyexternalstorage.cpp
Expand Up @@ -26,8 +26,6 @@ QgsSimpleCopyExternalStorageStoredContent::QgsSimpleCopyExternalStorageStoredCon

mCopyTask = new QgsCopyFileTask( filePath, url );

QgsApplication::instance()->taskManager()->addTask( mCopyTask );

connect( mCopyTask, &QgsTask::taskCompleted, this, [ = ]
{
mUrl = mCopyTask->destination();
Expand All @@ -46,6 +44,8 @@ QgsSimpleCopyExternalStorageStoredContent::QgsSimpleCopyExternalStorageStoredCon
} );

mStatus = Qgis::ContentStatus::OnGoing;

QgsApplication::instance()->taskManager()->addTask( mCopyTask );
}

void QgsSimpleCopyExternalStorageStoredContent::cancel()
Expand Down

0 comments on commit 780adde

Please sign in to comment.