Skip to content

Commit e009be9

Browse files
committed
removing no longer needed downloadItemsStarted signal
1 parent 95afeb6 commit e009be9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

app/test/testmerginapi.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,12 +2965,12 @@ void TestMerginApi::testDownloadWithNetworkError()
29652965
mApi->setNetworkManager( failingManager );
29662966

29672967
// Create signal spies
2968-
QSignalSpy startSpy( mApi, &MerginApi::downloadItemsStarted );
2968+
QSignalSpy startSpy( mApi, &MerginApi::pullFilesStarted );
29692969
QSignalSpy retrySpy( mApi, &MerginApi::downloadItemRetried );
29702970
QSignalSpy finishSpy( mApi, &MerginApi::syncProjectFinished );
29712971

29722972
// Trigger the current network error when download starts
2973-
connect( mApi, &MerginApi::downloadItemsStarted, this, [this, failingManager, networkError]()
2973+
connect( mApi, &MerginApi::pullFilesStarted, this, [this, failingManager, networkError]()
29742974
{
29752975
failingManager->setShouldFail( true, networkError );
29762976
} );
@@ -3002,7 +3002,7 @@ void TestMerginApi::testDownloadWithNetworkError()
30023002
QVERIFY( !localProject.isValid() );
30033003

30043004
// Disconnect all signals
3005-
disconnect( mApi, &MerginApi::downloadItemsStarted, this, nullptr );
3005+
disconnect( mApi, &MerginApi::pullFilesStarted, this, nullptr );
30063006

30073007
// Clean up
30083008
mApi->setNetworkManager( originalManager );
@@ -3023,7 +3023,7 @@ void TestMerginApi::testDownloadWithNetworkErrorRecovery()
30233023
mApi->setNetworkManager( failingManager );
30243024

30253025
// Create signal spies
3026-
QSignalSpy startSpy( mApi, &MerginApi::downloadItemsStarted );
3026+
QSignalSpy startSpy( mApi, &MerginApi::pullFilesStarted );
30273027
QSignalSpy retrySpy( mApi, &MerginApi::downloadItemRetried );
30283028
QSignalSpy finishSpy( mApi, &MerginApi::syncProjectFinished );
30293029

@@ -3038,13 +3038,13 @@ void TestMerginApi::testDownloadWithNetworkErrorRecovery()
30383038
if ( retryCount == 2 )
30393039
{
30403040
failingManager->setShouldFail( false );
3041-
disconnect( mApi, &MerginApi::downloadItemsStarted, nullptr, nullptr );
3041+
disconnect( mApi, &MerginApi::pullFilesStarted, nullptr, nullptr );
30423042
disconnect( mApi, &MerginApi::downloadItemRetried, nullptr, nullptr );
30433043
}
30443044
} );
30453045

30463046
// Trigger network error when download starts
3047-
connect( mApi, &MerginApi::downloadItemsStarted, this, [failingManager, networkError]()
3047+
connect( mApi, &MerginApi::pullFilesStarted, this, [failingManager, networkError]()
30483048
{
30493049
failingManager->setShouldFail( true, networkError );
30503050
} );

core/merginapi.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,8 +2445,6 @@ void MerginApi::startProjectPull( const QString &projectFullName )
24452445
}
24462446
else
24472447
{
2448-
emit downloadItemsStarted();
2449-
24502448
while ( transaction.replyPullItems.count() < 5 && !transaction.downloadQueue.isEmpty() )
24512449
{
24522450
downloadNextItem( projectFullName );

core/merginapi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ class MerginApi: public QObject
668668
void networkManagerChanged();
669669

670670
void downloadItemRetried( const QString &projectFullName, int retryCount );
671-
void downloadItemsStarted();
672671

673672
private slots:
674673
void listProjectsReplyFinished( QString requestId );

0 commit comments

Comments
 (0)