SyncEngine: Rename phase finishing slots

slotDiscoveryJobFinished -> slotDiscoveryFinished
slotFinished -> slotPropagationFinished

This should be clearer. Particular the
slotFinished -> finalize -> emit finished()
chain was confusing before.
This commit is contained in:
Christian Kamm 2019-01-14 15:44:50 +01:00 committed by ckamm
parent 28dcceb3e4
commit c5705de4cc
3 changed files with 7 additions and 7 deletions

View File

@ -63,7 +63,7 @@ public:
* Emitted once when done
*
* Except when SyncEngine jumps directly to finalize() without going
* through slotFinished().
* through slotPropagationFinished().
*/
Done
};

View File

@ -548,7 +548,7 @@ void SyncEngine::startSync()
syncError(errorString);
finalize(false);
});
connect(_discoveryPhase.data(), &DiscoveryPhase::finished, this, &SyncEngine::slotDiscoveryJobFinished);
connect(_discoveryPhase.data(), &DiscoveryPhase::finished, this, &SyncEngine::slotDiscoveryFinished);
auto discoveryJob = new ProcessDirectoryJob(SyncFileItemPtr(), ProcessDirectoryJob::NormalQuery, ProcessDirectoryJob::NormalQuery,
_discoveryPhase.data(), _discoveryPhase.data());
@ -591,7 +591,7 @@ void SyncEngine::slotNewItem(const SyncFileItemPtr &item)
_progressInfo->adjustTotalsForFile(*item);
}
void SyncEngine::slotDiscoveryJobFinished()
void SyncEngine::slotDiscoveryFinished()
{
if (!_discoveryPhase) {
// There was an error that was already taken care of
@ -681,7 +681,7 @@ void SyncEngine::slotDiscoveryJobFinished()
this, &SyncEngine::slotProgress);
connect(_propagator.data(), &OwncloudPropagator::updateFileTotal,
this, &SyncEngine::updateFileTotal);
connect(_propagator.data(), &OwncloudPropagator::finished, this, &SyncEngine::slotFinished, Qt::QueuedConnection);
connect(_propagator.data(), &OwncloudPropagator::finished, this, &SyncEngine::slotPropagationFinished, Qt::QueuedConnection);
connect(_propagator.data(), &OwncloudPropagator::seenLockedFile, this, &SyncEngine::seenLockedFile);
connect(_propagator.data(), &OwncloudPropagator::touchedFile, this, &SyncEngine::slotAddTouchedFile);
connect(_propagator.data(), &OwncloudPropagator::insufficientLocalStorage, this, &SyncEngine::slotInsufficientLocalStorage);
@ -743,7 +743,7 @@ void SyncEngine::slotItemCompleted(const SyncFileItemPtr &item)
emit itemCompleted(item);
}
void SyncEngine::slotFinished(bool success)
void SyncEngine::slotPropagationFinished(bool success)
{
if (_propagator->_anotherSyncNeeded && _anotherSyncNeeded == NoFollowUpSync) {
_anotherSyncNeeded = ImmediateFollowUp;

View File

@ -176,10 +176,10 @@ private slots:
void slotNewItem(const SyncFileItemPtr &item);
void slotItemCompleted(const SyncFileItemPtr &item);
void slotFinished(bool success);
void slotDiscoveryFinished();
void slotPropagationFinished(bool success);
void slotProgress(const SyncFileItem &item, quint64 curent);
void updateFileTotal(const SyncFileItem &item, quint64 newSize);
void slotDiscoveryJobFinished();
void slotCleanPollsJobAborted(const QString &error);
/** Records that a file was touched by a job. */