From 72f68aa9afc9cbb9f0890d5acfa2586a63c1158c Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Tue, 29 Oct 2024 18:00:52 +0100 Subject: [PATCH] Use slotComputeOverallSyncStatus as a slot. - Use qAsConst. Signed-off-by: Camila Ayres --- src/gui/owncloudgui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 52536d77a..e4f07f243 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -118,6 +118,8 @@ ownCloudGui::ownCloudGui(Application *parent) FolderMan *folderMan = FolderMan::instance(); connect(folderMan, &FolderMan::folderSyncStateChange, this, &ownCloudGui::slotSyncStateChange); + connect(folderMan, &FolderMan::folderSyncStateChange, this, &ownCloudGui::slotComputeOverallSyncStatus); + #ifdef BUILD_FILE_PROVIDER_MODULE connect(Mac::FileProvider::instance()->socketServer(), &Mac::FileProviderSocketServer::syncStateChanged, this, &ownCloudGui::slotComputeOverallSyncStatus); @@ -240,8 +242,6 @@ void ownCloudGui::slotTrayClicked(QSystemTrayIcon::ActivationReason reason) void ownCloudGui::slotSyncStateChange(Folder *folder) { - slotComputeOverallSyncStatus(); - if (!folder) { return; // Valid, just a general GUI redraw was needed. } @@ -371,7 +371,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() #else QStringList messages; messages.append(tr("Disconnected from accounts:")); - for (const auto &accountState : problemAccounts) { + for (const auto &accountState : qAsConst(problemAccounts)) { QString message = tr("Account %1: %2").arg(accountState->account()->displayName(), accountState->stateString(accountState->state())); if (!accountState->connectionErrors().empty()) { message += QLatin1String("\n"); -- 2.30.2