diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-02-17 16:39:24 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-02-19 15:11:00 +0300 |
commit | 8f96e82d9fd349daf1dff5397af65c3ce79b874f (patch) | |
tree | 3b485323ade5843099be1224cb3888c5c955fa94 /src | |
parent | 17a8d30e688321eb7f86f80c57889be3030727ea (diff) |
Add missing Q_EMIT
Diffstat (limited to 'src')
-rw-r--r-- | src/libsync/syncengine.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index b97135ab3..141dfae43 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -430,7 +430,7 @@ void SyncEngine::startSync() if (!QDir(_localPath).exists()) { _anotherSyncNeeded = DelayedFollowUp; // No _tr, it should only occur in non-mirall - syncError(QStringLiteral("Unable to find local sync folder.")); + Q_EMIT syncError(QStringLiteral("Unable to find local sync folder.")); finalize(false); return; } @@ -443,11 +443,11 @@ void SyncEngine::startSync() qCWarning(lcEngine()) << "Too little space available at" << _localPath << ". Have" << freeBytes << "bytes and require at least" << minFree << "bytes"; _anotherSyncNeeded = DelayedFollowUp; - syncError(tr("Only %1 are available, need at least %2 to start", + Q_EMIT syncError(tr("Only %1 are available, need at least %2 to start", "Placeholders are postfixed with file sizes using Utility::octetsToString()") - .arg( - Utility::octetsToString(freeBytes), - Utility::octetsToString(minFree))); + .arg( + Utility::octetsToString(freeBytes), + Utility::octetsToString(minFree))); finalize(false); return; } else { @@ -471,7 +471,7 @@ void SyncEngine::startSync() // This creates the DB if it does not exist yet. if (!_journal->open()) { qCWarning(lcEngine) << "No way to create a sync journal!"; - syncError(tr("Unable to open or create the local sync database. Make sure you have write access in the sync folder.")); + Q_EMIT syncError(tr("Unable to open or create the local sync database. Make sure you have write access in the sync folder.")); finalize(false); return; // database creation error! @@ -487,7 +487,7 @@ void SyncEngine::startSync() _lastLocalDiscoveryStyle = _localDiscoveryStyle; if (_syncOptions._vfs->mode() == Vfs::WithSuffix && _syncOptions._vfs->fileSuffix().isEmpty()) { - syncError(tr("Using virtual files with suffix, but suffix is not set")); + Q_EMIT syncError(tr("Using virtual files with suffix, but suffix is not set")); finalize(false); return; } @@ -499,7 +499,7 @@ void SyncEngine::startSync() qCInfo(lcEngine) << (usingSelectiveSync ? "Using Selective Sync" : "NOT Using Selective Sync"); } else { qCWarning(lcEngine) << "Could not retrieve selective sync list from DB"; - syncError(tr("Unable to read the blacklist from the local database")); + Q_EMIT syncError(tr("Unable to read the blacklist from the local database")); finalize(false); return; } @@ -530,7 +530,7 @@ void SyncEngine::startSync() _discoveryPhase->setSelectiveSyncWhiteList(_journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, &ok)); if (!ok) { qCWarning(lcEngine) << "Unable to read selective sync list, aborting."; - syncError(tr("Unable to read from the sync journal.")); + Q_EMIT syncError(tr("Unable to read from the sync journal.")); finalize(false); return; } @@ -554,7 +554,7 @@ void SyncEngine::startSync() connect(_discoveryPhase.data(), &DiscoveryPhase::itemDiscovered, this, &SyncEngine::slotItemDiscovered); connect(_discoveryPhase.data(), &DiscoveryPhase::newBigFolder, this, &SyncEngine::newBigFolder); connect(_discoveryPhase.data(), &DiscoveryPhase::fatalError, this, [this](const QString &errorString) { - syncError(errorString); + Q_EMIT syncError(errorString); finalize(false); }); connect(_discoveryPhase.data(), &DiscoveryPhase::finished, this, &SyncEngine::slotDiscoveryFinished); @@ -614,7 +614,7 @@ void SyncEngine::slotDiscoveryFinished() // Sanity check if (!_journal->open()) { qCWarning(lcEngine) << "Bailing out, DB failure"; - syncError(tr("Cannot open the sync journal")); + Q_EMIT syncError(tr("Cannot open the sync journal")); finalize(false); return; } else { @@ -701,7 +701,7 @@ void SyncEngine::slotDiscoveryFinished() // Emit the started signal only after the propagator has been set up. if (_needsUpdate) - emit(started()); + Q_EMIT started(); _propagator->start(_syncItems); _syncItems.clear(); @@ -1002,7 +1002,7 @@ void SyncEngine::abort() disconnect(_discoveryPhase.data(), nullptr, this, nullptr); _discoveryPhase.take()->deleteLater(); - syncError(tr("Aborted")); + Q_EMIT syncError(tr("Aborted")); finalize(false); } } |