Skip to content

Commit

Permalink
Fix compiling when BUILD_UPDATER is set to OFF.
Browse files Browse the repository at this point in the history
Only connect signal/slot for update channels listing when BUILD_UPDATER is ON.

Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Oct 31, 2024
1 parent 19db552 commit 9b33cb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Check warning on line 137 in src/gui/settingsdialog.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/settingsdialog.cpp:137:14 [cppcoreguidelines-init-variables]

variable 'networkAction' is not initialized
_actionGroup->addAction(networkAction);
Expand Down

0 comments on commit 9b33cb5

Please sign in to comment.