Use slots as slots.

Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
Camila Ayres 2024-10-29 20:12:20 +01:00 committed by Matthieu Gallien
parent 27ad53810e
commit fc6ecf8186
No known key found for this signature in database
GPG key ID: 7D0F74F05C22F553
5 changed files with 4 additions and 22 deletions

View file

@ -365,7 +365,7 @@ Application::Application(int &argc, char **argv)
}
_theme->setSystrayUseMonoIcons(ConfigFile().monoIcons());
connect(_theme, &Theme::systrayUseMonoIconsChanged, this, &Application::slotUseMonoIconsChanged);
connect(_theme, &Theme::systrayUseMonoIconsChanged, _gui, &ownCloudGui::slotComputeOverallSyncStatus);
connect(this, &Application::systemPaletteChanged,
_theme, &Theme::systemPaletteHasChanged);
@ -589,7 +589,7 @@ void Application::slotAccountStateRemoved(AccountState *accountState)
{
if (_gui) {
disconnect(accountState, &AccountState::stateChanged,
_gui.data(), &ownCloudGui::slotAccountStateChanged);
_gui.data(), &ownCloudGui::slotComputeOverallSyncStatus);
disconnect(accountState->account().data(), &Account::serverVersionChanged,
_gui.data(), &ownCloudGui::slotTrayMessageIfServerUnsupported);
}
@ -611,7 +611,7 @@ void Application::slotAccountStateRemoved(AccountState *accountState)
void Application::slotAccountStateAdded(AccountState *accountState)
{
connect(accountState, &AccountState::stateChanged,
_gui.data(), &ownCloudGui::slotAccountStateChanged);
_gui.data(), &ownCloudGui::slotComputeOverallSyncStatus);
connect(accountState->account().data(), &Account::serverVersionChanged,
_gui.data(), &ownCloudGui::slotTrayMessageIfServerUnsupported);
connect(accountState, &AccountState::termsOfServiceChanged,
@ -716,11 +716,6 @@ void Application::setupLogging()
qCInfo(lcApplication) << "Arguments:" << qApp->arguments();
}
void Application::slotUseMonoIconsChanged(bool)
{
_gui->slotComputeOverallSyncStatus();
}
void Application::slotParseMessage(const QString &msg, QObject *)
{
if (msg.startsWith(QLatin1String("MSG_PARSEOPTIONS:"))) {

View file

@ -101,7 +101,6 @@ signals:
protected slots:
void slotParseMessage(const QString &, QObject *);
void slotCheckConnection();
void slotUseMonoIconsChanged(bool);
void slotCleanup();
void slotAccountStateAdded(OCC::AccountState *accountState);
void slotAccountStateRemoved(OCC::AccountState *accountState);

View file

@ -258,21 +258,11 @@ void ownCloudGui::slotSyncStateChange(Folder *folder)
}
}
void ownCloudGui::slotFoldersChanged()
{
slotComputeOverallSyncStatus();
}
void ownCloudGui::slotOpenPath(const QString &path)
{
showInFileManager(path);
}
void ownCloudGui::slotAccountStateChanged()
{
slotComputeOverallSyncStatus();
}
void ownCloudGui::slotTrayMessageIfServerUnsupported(Account *account)
{
if (account->serverVersionUnsupported()) {

View file

@ -79,7 +79,6 @@ public slots:
void slotFolderOpenAction(const QString &alias);
void slotUpdateProgress(const QString &folder, const OCC::ProgressInfo &progress);
void slotShowGuiMessage(const QString &title, const QString &message);
void slotFoldersChanged();
void slotShowSettings();
void slotShowSyncProtocol();
void slotShutdown();
@ -92,7 +91,6 @@ public slots:
void slotSettingsDialogActivated();
void slotHelp();
void slotOpenPath(const QString &path);
void slotAccountStateChanged();
void slotTrayMessageIfServerUnsupported(OCC::Account *account);
void slotNeedToAcceptTermsOfService(OCC::AccountPtr account,
OCC::AccountState::State state);

View file

@ -261,7 +261,7 @@ void SettingsDialog::accountAdded(AccountState *s)
_actionForAccount.insert(s->account().data(), accountAction);
accountAction->trigger();
connect(accountSettings, &AccountSettings::folderChanged, _gui, &ownCloudGui::slotFoldersChanged);
connect(accountSettings, &AccountSettings::folderChanged, _gui, &ownCloudGui::slotComputeOverallSyncStatus);
connect(accountSettings, &AccountSettings::openFolderAlias,
_gui, &ownCloudGui::slotFolderOpenAction);
connect(accountSettings, &AccountSettings::showIssuesList, this, &SettingsDialog::showIssuesList);