diff --git a/app/test/testmerginapi.cpp b/app/test/testmerginapi.cpp index 273cf339b..8e7f648c3 100644 --- a/app/test/testmerginapi.cpp +++ b/app/test/testmerginapi.cpp @@ -2965,12 +2965,12 @@ void TestMerginApi::testDownloadWithNetworkError() mApi->setNetworkManager( failingManager ); // Create signal spies - QSignalSpy startSpy( mApi, &MerginApi::downloadItemsStarted ); + QSignalSpy startSpy( mApi, &MerginApi::pullFilesStarted ); QSignalSpy retrySpy( mApi, &MerginApi::downloadItemRetried ); QSignalSpy finishSpy( mApi, &MerginApi::syncProjectFinished ); // Trigger the current network error when download starts - connect( mApi, &MerginApi::downloadItemsStarted, this, [this, failingManager, networkError]() + connect( mApi, &MerginApi::pullFilesStarted, this, [this, failingManager, networkError]() { failingManager->setShouldFail( true, networkError ); } ); @@ -3002,7 +3002,7 @@ void TestMerginApi::testDownloadWithNetworkError() QVERIFY( !localProject.isValid() ); // Disconnect all signals - disconnect( mApi, &MerginApi::downloadItemsStarted, this, nullptr ); + disconnect( mApi, &MerginApi::pullFilesStarted, this, nullptr ); // Clean up mApi->setNetworkManager( originalManager ); @@ -3023,7 +3023,7 @@ void TestMerginApi::testDownloadWithNetworkErrorRecovery() mApi->setNetworkManager( failingManager ); // Create signal spies - QSignalSpy startSpy( mApi, &MerginApi::downloadItemsStarted ); + QSignalSpy startSpy( mApi, &MerginApi::pullFilesStarted ); QSignalSpy retrySpy( mApi, &MerginApi::downloadItemRetried ); QSignalSpy finishSpy( mApi, &MerginApi::syncProjectFinished ); @@ -3038,13 +3038,13 @@ void TestMerginApi::testDownloadWithNetworkErrorRecovery() if ( retryCount == 2 ) { failingManager->setShouldFail( false ); - disconnect( mApi, &MerginApi::downloadItemsStarted, nullptr, nullptr ); + disconnect( mApi, &MerginApi::pullFilesStarted, nullptr, nullptr ); disconnect( mApi, &MerginApi::downloadItemRetried, nullptr, nullptr ); } } ); // Trigger network error when download starts - connect( mApi, &MerginApi::downloadItemsStarted, this, [failingManager, networkError]() + connect( mApi, &MerginApi::pullFilesStarted, this, [failingManager, networkError]() { failingManager->setShouldFail( true, networkError ); } ); diff --git a/core/merginapi.cpp b/core/merginapi.cpp index 62f2461a2..5a6804903 100644 --- a/core/merginapi.cpp +++ b/core/merginapi.cpp @@ -2445,8 +2445,6 @@ void MerginApi::startProjectPull( const QString &projectFullName ) } else { - emit downloadItemsStarted(); - while ( transaction.replyPullItems.count() < 5 && !transaction.downloadQueue.isEmpty() ) { downloadNextItem( projectFullName ); diff --git a/core/merginapi.h b/core/merginapi.h index ebc4fcb64..4646e9361 100644 --- a/core/merginapi.h +++ b/core/merginapi.h @@ -668,7 +668,6 @@ class MerginApi: public QObject void networkManagerChanged(); void downloadItemRetried( const QString &projectFullName, int retryCount ); - void downloadItemsStarted(); private slots: void listProjectsReplyFinished( QString requestId );