From e46e4e225c3eadd82675df9ca43a04d2ea51dfc1 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 09:35:02 +0200 Subject: [PATCH 01/10] Remove checks for the update channel from the getter function. It should only return the value. Signed-off-by: Camila Ayres --- src/libsync/configfile.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 1ebbe5f5b8f7..28a1dd6f3fb6 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -707,32 +707,25 @@ QString ConfigFile::defaultUpdateChannel() const if (serverHasValidSubscription() && !isBranded) { if (const auto serverChannel = desktopEnterpriseChannel(); validUpdateChannels().contains(serverChannel)) { - qCWarning(lcConfigFile()) << "Enforcing update channel" << serverChannel << "because that is the desktop enterprise channel returned by the server."; + qCWarning(lcConfigFile()) << "Default update channel is" << serverChannel << "because that is the desktop enterprise channel returned by the server."; return serverChannel; } } if (const auto currentVersionSuffix = Theme::instance()->versionSuffix(); validUpdateChannels().contains(currentVersionSuffix) && !isBranded) { - qCWarning(lcConfigFile()) << "Enforcing update channel" << currentVersionSuffix << "because of the version suffix of the current client."; + qCWarning(lcConfigFile()) << "Default update channel is" << currentVersionSuffix << "because of the version suffix of the current client."; return currentVersionSuffix; } - qCWarning(lcConfigFile()) << "Enforcing default update channel" << defaultUpdateChannelName; + qCWarning(lcConfigFile()) << "Default update channel is" << defaultUpdateChannelName; return defaultUpdateChannelName; } QString ConfigFile::currentUpdateChannel() const { - auto updateChannel = defaultUpdateChannel(); QSettings settings(configFile(), QSettings::IniFormat); - if (const auto configUpdateChannel = settings.value(QLatin1String(updateChannelC), updateChannel).toString(); - validUpdateChannels().contains(configUpdateChannel)) { - qCWarning(lcConfigFile()) << "Config file has a valid update channel:" << configUpdateChannel; - updateChannel = configUpdateChannel; - } - - return updateChannel; + return settings.value(QLatin1String(updateChannelC), defaultUpdateChannel()).toString(); } void ConfigFile::setUpdateChannel(const QString &channel) From dcd3b018fa6a5197617f6ee05b8e3e6dc217d252 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Wed, 16 Oct 2024 11:43:39 +0200 Subject: [PATCH 02/10] Change the list of update channels when server capabilities change. Signed-off-by: Camila Ayres --- src/gui/accountmanager.cpp | 1 + src/gui/accountmanager.h | 1 + src/gui/generalsettings.cpp | 23 +++++++++++++++-------- src/gui/generalsettings.h | 5 +++++ src/gui/settingsdialog.cpp | 6 ++++-- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 57dfd097bb9c..e091b4de930f 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -665,6 +665,7 @@ void AccountManager::addAccountState(AccountState *const accountState) Q_ASSERT(accountState->account()); QObject::connect(accountState->account().data(), &Account::wantsAccountSaved, this, &AccountManager::saveAccount); + QObject::connect(accountState->account().data(), &Account::capabilitiesChanged, this, &AccountManager::capabilitiesChanged); AccountStatePtr ptr(accountState); _accounts << ptr; diff --git a/src/gui/accountmanager.h b/src/gui/accountmanager.h index 32b7ca8e40ae..768f902ef3c9 100644 --- a/src/gui/accountmanager.h +++ b/src/gui/accountmanager.h @@ -114,6 +114,7 @@ public slots: void accountSyncConnectionRemoved(OCC::AccountState *account); void removeAccountFolders(OCC::AccountState *account); void forceLegacyImportChanged(); + void capabilitiesChanged(); private: // saving and loading Account to settings diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 6af68b396cbe..4e780b55237c 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -244,6 +244,10 @@ GeneralSettings::GeneralSettings(QWidget *parent) // accountAdded means the wizard was finished and the wizard might change some options. connect(AccountManager::instance(), &AccountManager::accountAdded, this, &GeneralSettings::loadMiscSettings); +#if defined(BUILD_UPDATER) + loadUpdateChannelsList(); +#endif + customizeStyle(); } @@ -284,18 +288,21 @@ void GeneralSettings::loadMiscSettings() _ui->stopExistingFolderNowBigSyncCheckBox->setChecked(_ui->existingFolderLimitCheckBox->isChecked() && cfgFile.stopSyncingExistingFoldersOverLimit()); _ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage()); _ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons()); +} #if defined(BUILD_UPDATER) - const auto validUpdateChannels = cfgFile.validUpdateChannels(); - _ui->updateChannel->clear(); - _ui->updateChannel->addItems(validUpdateChannels); - const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.currentUpdateChannel()); - _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0); - connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); -#endif +void GeneralSettings::loadUpdateChannelsList() { + ConfigFile cfgFile; + if (_currentUpdateChannelList != cfgFile.validUpdateChannels()) { + _currentUpdateChannelList = cfgFile.validUpdateChannels(); + _ui->updateChannel->clear(); + _ui->updateChannel->addItems(_currentUpdateChannelList); + const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); + _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0); + connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); + } } -#if defined(BUILD_UPDATER) void GeneralSettings::slotUpdateInfo() { ConfigFile config; diff --git a/src/gui/generalsettings.h b/src/gui/generalsettings.h index 70a726142db8..02a8cef3dedf 100644 --- a/src/gui/generalsettings.h +++ b/src/gui/generalsettings.h @@ -23,6 +23,7 @@ namespace OCC { class IgnoreListEditor; class SyncLogDialog; +class AccountState; namespace Ui { class GeneralSettings; @@ -43,6 +44,9 @@ class GeneralSettings : public QWidget public slots: void slotStyleChanged(); +#if defined(BUILD_UPDATER) + void loadUpdateChannelsList(); +#endif private slots: void saveMiscSettings(); @@ -67,6 +71,7 @@ private slots: Ui::GeneralSettings *_ui; QPointer _ignoreEditor; bool _currentlyLoading = false; + QStringList _currentUpdateChannelList; }; diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index a59314a15ce7..bd14bb71b043 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -127,6 +127,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) connect(this, &SettingsDialog::styleChanged, generalSettings, &GeneralSettings::slotStyleChanged); + connect(AccountManager::instance(), &AccountManager::accountAdded, generalSettings, &GeneralSettings::loadUpdateChannelsList); + connect(AccountManager::instance(), &AccountManager::capabilitiesChanged, generalSettings, &GeneralSettings::loadUpdateChannelsList); QAction *networkAction = createColorAwareAction(QLatin1String(":/client/theme/network.svg"), tr("Network")); _actionGroup->addAction(networkAction); @@ -137,8 +139,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _actionGroupWidgets.insert(generalAction, generalSettings); _actionGroupWidgets.insert(networkAction, networkSettings); - foreach(auto ai, AccountManager::instance()->accounts()) { - accountAdded(ai.data()); + foreach(auto account, AccountManager::instance()->accounts()) { + accountAdded(account.data()); } QTimer::singleShot(1, this, &SettingsDialog::showFirstPage); From 3cfda351b5f4ae475346f97378fd290ab902b315 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 16:47:59 +0200 Subject: [PATCH 03/10] Do not override the subscription value if one of the account has enterprise. Signed-off-by: Camila Ayres --- src/libsync/account.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 401e22ae9a03..676459f8839f 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -1079,7 +1079,7 @@ void Account::updateServerSubcription() { ConfigFile currentConfig; if (const auto serverHasValidSubscription = _capabilities.serverHasValidSubscription(); - serverHasValidSubscription != currentConfig.serverHasValidSubscription()) { + serverHasValidSubscription != currentConfig.serverHasValidSubscription() && !serverHasValidSubscription) { currentConfig.setServerHasValidSubscription(serverHasValidSubscription); } } From b9e88ce1c88aba363e13ce24975b527dd15e48d7 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 16:51:27 +0200 Subject: [PATCH 04/10] Do not override the channels list if one of the account has enterprise. Maintain stable and enterprise. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 4e780b55237c..c14fd6f9d28a 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -293,7 +293,7 @@ void GeneralSettings::loadMiscSettings() #if defined(BUILD_UPDATER) void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; - if (_currentUpdateChannelList != cfgFile.validUpdateChannels()) { + if (_currentUpdateChannelList != cfgFile.validUpdateChannels() && !cfgFile.serverHasValidSubscription()) { _currentUpdateChannelList = cfgFile.validUpdateChannels(); _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); From 4c942a544a179e97bad858cbfd2001c7b3a4d881 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 18:40:06 +0200 Subject: [PATCH 05/10] Save serverHasValidsubcription in the account. Signed-off-by: Camila Ayres --- src/gui/accountmanager.cpp | 2 +- src/libsync/account.cpp | 21 ++++++++++++++++++--- src/libsync/account.h | 5 +++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index e091b4de930f..b23f31e7133d 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -338,7 +338,7 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s settings.setValue(QLatin1String(serverVersionC), acc->_serverVersion); settings.setValue(QLatin1String(serverColorC), acc->_serverColor); settings.setValue(QLatin1String(serverTextColorC), acc->_serverTextColor); - settings.setValue(QLatin1String(serverHasValidSubscriptionC), acc->capabilities().serverHasValidSubscription()); + settings.setValue(QLatin1String(serverHasValidSubscriptionC), acc->serverHasValidSubscription()); if (!acc->_skipE2eeMetadataChecksumValidation) { settings.remove(QLatin1String(skipE2eeMetadataChecksumValidationC)); diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 676459f8839f..362164148f8e 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -1075,13 +1075,28 @@ void Account::setAskUserForMnemonic(const bool ask) emit askUserForMnemonicChanged(); } +bool Account::serverHasValidSubscription() const +{ + return _serverHasValidSubscription; +} + +void Account::setServerHasValidSubscription(bool valid) +{ + if (_serverHasValidSubscription != valid) { + _serverHasValidSubscription = valid; + } +} + void Account::updateServerSubcription() { ConfigFile currentConfig; - if (const auto serverHasValidSubscription = _capabilities.serverHasValidSubscription(); - serverHasValidSubscription != currentConfig.serverHasValidSubscription() && !serverHasValidSubscription) { - currentConfig.setServerHasValidSubscription(serverHasValidSubscription); + const auto capabilityValidSubscription = _capabilities.serverHasValidSubscription(); + const auto configValidSubscription = currentConfig.serverHasValidSubscription(); + if (capabilityValidSubscription != configValidSubscription && !configValidSubscription) { + currentConfig.setServerHasValidSubscription(capabilityValidSubscription); } + + setServerHasValidSubscription(capabilityValidSubscription); } void Account::updateDesktopEnterpriseChannel() diff --git a/src/libsync/account.h b/src/libsync/account.h index 92a132ef6c48..6333164add15 100644 --- a/src/libsync/account.h +++ b/src/libsync/account.h @@ -409,6 +409,9 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject [[nodiscard]] unsigned int downloadLimit() const; void setDownloadLimit(unsigned int kbytes); + [[nodiscard]] bool serverHasValidSubscription() const; + void setServerHasValidSubscription(bool valid); + public slots: /// Used when forgetting credentials void clearQNAMCache(); @@ -553,6 +556,8 @@ private slots: unsigned int _uploadLimit = 0; unsigned int _downloadLimit = 0; + bool _serverHasValidSubscription = false; + /* IMPORTANT - remove later - FIXME MS@2019-12-07 --> * TODO: For "Log out" & "Remove account": Remove client CA certs and KEY! * From 09219a22cfdc98acfd2cdc2f8a8ad82b2d7afdf9 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 19:53:59 +0200 Subject: [PATCH 06/10] Fix logic for initial load of update channels and priority for user with subscription. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index c14fd6f9d28a..8d7db2d79510 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -293,8 +293,9 @@ void GeneralSettings::loadMiscSettings() #if defined(BUILD_UPDATER) void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; - if (_currentUpdateChannelList != cfgFile.validUpdateChannels() && !cfgFile.serverHasValidSubscription()) { - _currentUpdateChannelList = cfgFile.validUpdateChannels(); + const auto validUpdateChannels = cfgFile.validUpdateChannels(); + if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) { + _currentUpdateChannelList = validUpdateChannels; _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); From 093772f11e9329fdf35eb5fa1138f918ec2b3c47 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 20:55:19 +0200 Subject: [PATCH 07/10] Update config value when serverHasValidSubscription when accounts are added or removed. To give priority to server susbscriptions and keep listing the right update channels. Signed-off-by: Camila Ayres --- src/gui/accountmanager.cpp | 26 ++++++++++++++++++++++++++ src/gui/accountmanager.h | 3 +++ src/gui/settingsdialog.cpp | 1 + 3 files changed, 30 insertions(+) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index b23f31e7133d..4245d683b407 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -606,10 +606,30 @@ void AccountManager::deleteAccount(OCC::AccountState *account) account->account()->deleteAppToken(); + // clean up config from subscriptions if the account removed was the only with valid subscription + if (account->account()->serverHasValidSubscription()) { + updateServerHasValidSubscriptionConfig(); + } + emit accountSyncConnectionRemoved(account); emit accountRemoved(account); } +void AccountManager::updateServerHasValidSubscriptionConfig() +{ + auto serverHasValidSubscription = false; + for (const auto &account : _accounts) { + if (!account->account()->serverHasValidSubscription()) { + continue; + } + + serverHasValidSubscription = true; + break; + } + + ConfigFile().setServerHasValidSubscription(serverHasValidSubscription); +} + AccountPtr AccountManager::createAccount() { const auto acc = Account::create(); @@ -670,6 +690,12 @@ void AccountManager::addAccountState(AccountState *const accountState) AccountStatePtr ptr(accountState); _accounts << ptr; ptr->trySignIn(); + + // update config subscriptions if the account added is the only with valid subscription + if (accountState->account()->serverHasValidSubscription() && !ConfigFile().serverHasValidSubscription()) { + updateServerHasValidSubscriptionConfig(); + } + emit accountAdded(accountState); } diff --git a/src/gui/accountmanager.h b/src/gui/accountmanager.h index 768f902ef3c9..85a244ced4fb 100644 --- a/src/gui/accountmanager.h +++ b/src/gui/accountmanager.h @@ -129,6 +129,9 @@ public slots: // Adds an account to the tracked list, emitting accountAdded() void addAccountState(AccountState *const accountState); + // update config serverHasValidSubscription when accounts list changes + void updateServerHasValidSubscriptionConfig(); + AccountManager() = default; QList _accounts; /// Account ids from settings that weren't read diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index bd14bb71b043..429808d66ee1 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -128,6 +128,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) connect(this, &SettingsDialog::styleChanged, generalSettings, &GeneralSettings::slotStyleChanged); connect(AccountManager::instance(), &AccountManager::accountAdded, generalSettings, &GeneralSettings::loadUpdateChannelsList); + connect(AccountManager::instance(), &AccountManager::accountRemoved, generalSettings, &GeneralSettings::loadUpdateChannelsList); connect(AccountManager::instance(), &AccountManager::capabilitiesChanged, generalSettings, &GeneralSettings::loadUpdateChannelsList); QAction *networkAction = createColorAwareAction(QLatin1String(":/client/theme/network.svg"), tr("Network")); From b0e8b194338363d1c37e8d83e36aab3dec36ae1b Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 21:04:56 +0200 Subject: [PATCH 08/10] Address PR feedback. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 2 +- src/gui/settingsdialog.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 8d7db2d79510..77b17a27d417 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -299,7 +299,7 @@ void GeneralSettings::loadUpdateChannelsList() { _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); - _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0); + _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0); connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); } } diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 429808d66ee1..261526e11ac2 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -140,7 +140,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _actionGroupWidgets.insert(generalAction, generalSettings); _actionGroupWidgets.insert(networkAction, networkSettings); - foreach(auto account, AccountManager::instance()->accounts()) { + const auto accountsList = AccountManager::instance()->accounts(); + for (const auto &account : accountsList) { accountAdded(account.data()); } From 14384641da3aa16404dc1359913d48438ae2d631 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 31 Oct 2024 13:01:16 +0100 Subject: [PATCH 09/10] Remove check in setServerHasValidSubscription. Signed-off-by: Camila Ayres --- src/libsync/account.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 362164148f8e..b021ff1d406a 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -1082,9 +1082,7 @@ bool Account::serverHasValidSubscription() const void Account::setServerHasValidSubscription(bool valid) { - if (_serverHasValidSubscription != valid) { - _serverHasValidSubscription = valid; - } + _serverHasValidSubscription = valid; } void Account::updateServerSubcription() From 3b2a1cc2871bbb5d9d26abf41e074b7c1fa5ed87 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 31 Oct 2024 13:01:53 +0100 Subject: [PATCH 10/10] Fix compiling when BUILD_UPDATER is set to OFF. Only connect signal/slot for update channels listing when BUILD_UPDATER is ON. Signed-off-by: Camila Ayres --- src/gui/settingsdialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 261526e11ac2..fc09c0cdce04 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -127,9 +127,12 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) connect(this, &SettingsDialog::styleChanged, generalSettings, &GeneralSettings::slotStyleChanged); + +#if defined(BUILD_UPDATER) connect(AccountManager::instance(), &AccountManager::accountAdded, generalSettings, &GeneralSettings::loadUpdateChannelsList); connect(AccountManager::instance(), &AccountManager::accountRemoved, generalSettings, &GeneralSettings::loadUpdateChannelsList); connect(AccountManager::instance(), &AccountManager::capabilitiesChanged, generalSettings, &GeneralSettings::loadUpdateChannelsList); +#endif QAction *networkAction = createColorAwareAction(QLatin1String(":/client/theme/network.svg"), tr("Network")); _actionGroup->addAction(networkAction);