From 6146f7d5cf948ccb57accced24dd68905f8a0616 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 19 Dec 2022 15:11:18 +0100 Subject: [PATCH] Add 'emit' keyword to signal emissions that were missing them Signed-off-by: Claudio Cambra --- src/gui/connectionvalidator.cpp | 2 +- src/gui/creds/webflowcredentials.cpp | 2 +- src/gui/editlocallyjob.cpp | 2 +- src/gui/filedetails/sharemodel.cpp | 2 +- src/gui/folderstatusmodel.cpp | 2 +- src/libsync/creds/httpcredentials.cpp | 2 +- src/libsync/discovery.cpp | 4 ++-- src/libsync/discoveryphase.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp index 1fd296315..5868d72e2 100644 --- a/src/gui/connectionvalidator.cpp +++ b/src/gui/connectionvalidator.cpp @@ -114,7 +114,7 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in if (_account->url() != url) { qCInfo(lcConnectionValidator()) << "status.php was redirected to" << url.toString(); _account->setUrl(url); - _account->wantsAccountSaved(_account.data()); + emit _account->wantsAccountSaved(_account.data()); } if (!serverVersion.isEmpty() && !setAndCheckServerVersion(serverVersion)) { diff --git a/src/gui/creds/webflowcredentials.cpp b/src/gui/creds/webflowcredentials.cpp index 6b388cd88..9958d1b7d 100644 --- a/src/gui/creds/webflowcredentials.cpp +++ b/src/gui/creds/webflowcredentials.cpp @@ -238,7 +238,7 @@ void WebFlowCredentials::persist() { } _account->setCredentialSetting(userC, _user); - _account->wantsAccountSaved(_account); + emit _account->wantsAccountSaved(_account); // write cert if there is one if (!_clientSslCertificate.isNull()) { diff --git a/src/gui/editlocallyjob.cpp b/src/gui/editlocallyjob.cpp index 56de2cb2a..5e1b2837c 100644 --- a/src/gui/editlocallyjob.cpp +++ b/src/gui/editlocallyjob.cpp @@ -414,7 +414,7 @@ void EditLocallyJob::showErrorNotification(const QString &message, const QString }); if (foundFolder != folderMap.cend()) { - (*foundFolder)->syncEngine().addErrorToGui(SyncFileItem::SoftError, message, informativeText); + emit (*foundFolder)->syncEngine().addErrorToGui(SyncFileItem::SoftError, message, informativeText); } } diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index bbd7bf24b..f6564887c 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -314,7 +314,7 @@ void ShareModel::initShareManager() connect(_manager.data(), &ShareManager::serverError, this, [this](const int code, const QString &message){ _hasInitialShareFetchCompleted = true; Q_EMIT hasInitialShareFetchCompletedChanged(); - serverError(code, message); + emit serverError(code, message); }); _manager->fetchShares(_sharePath); diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index a64189dd8..8bb475553 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -821,7 +821,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list) } for (int undecidedIndex : qAsConst(undecidedIndexes)) { - suggestExpand(index(undecidedIndex, 0, idx)); + emit suggestExpand(index(undecidedIndex, 0, idx)); } /* Try to remove the the undecided lists the items that are not on the server. */ auto it = std::remove_if(selectiveSyncUndecidedList.begin(), selectiveSyncUndecidedList.end(), diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp index b0038efbd..21ec6b823 100644 --- a/src/libsync/creds/httpcredentials.cpp +++ b/src/libsync/creds/httpcredentials.cpp @@ -523,7 +523,7 @@ void HttpCredentials::persist() // it's just written if it gets passed into the constructor. _account->setCredentialSetting(QLatin1String(clientCertBundleC), _clientCertBundle); } - _account->wantsAccountSaved(_account); + emit _account->wantsAccountSaved(_account); // write secrets to the keychain if (!_clientCertBundle.isEmpty()) { diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 79758a777..73dbe7faa 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -955,7 +955,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( // Not locally, not on the server. The entry is stale! qCInfo(lcDisco) << "Stale DB entry"; if (!_discoveryData->_statedb->deleteFileRecord(path._original, true)) { - _discoveryData->fatalError(tr("Error while deleting file record %1 from the database").arg(path._original)); + emit _discoveryData->fatalError(tr("Error while deleting file record %1 from the database").arg(path._original)); qCWarning(lcDisco) << "Failed to delete a file record from the local DB" << path._original; } return; @@ -1788,7 +1788,7 @@ int ProcessDirectoryJob::processSubJobs(int nbJobs) void ProcessDirectoryJob::dbError() { - _discoveryData->fatalError(tr("Error while reading the database")); + emit _discoveryData->fatalError(tr("Error while reading the database")); } void ProcessDirectoryJob::addVirtualFileSuffix(QString &str) const diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 760e9d593..a622acd31 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -187,7 +187,7 @@ QPair DiscoveryPhase::findAndCancelDeletedJob(const QString &o qCWarning(lcDiscovery) << "(*it)->_type" << (*it)->_type; qCWarning(lcDiscovery) << "(*it)->_isRestoration " << (*it)->_isRestoration; Q_ASSERT(false); - addErrorToGui(SyncFileItem::Status::FatalError, tr("Error while canceling deletion of a file"), originalPath); + emit addErrorToGui(SyncFileItem::Status::FatalError, tr("Error while canceling deletion of a file"), originalPath); emit fatalError(tr("Error while canceling deletion of %1").arg(originalPath)); } (*it)->_instruction = CSYNC_INSTRUCTION_NONE; -- 2.30.2