Explorar o código

Add 'emit' keyword to signal emissions that were missing them

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Claudio Cambra %!s(int64=3) %!d(string=hai) anos
pai
achega
6146f7d5cf

+ 1 - 1
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)) {

+ 1 - 1
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()) {

+ 1 - 1
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);
     }
 }
 

+ 1 - 1
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);

+ 1 - 1
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(),

+ 1 - 1
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()) {

+ 2 - 2
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

+ 1 - 1
src/libsync/discoveryphase.cpp

@@ -187,7 +187,7 @@ QPair<bool, QByteArray> 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;