Skip to content

Commit 031319f

Browse files
committed
List daily update channel in the general settings view.
Signed-off-by: Camila Ayres <[email protected]>
1 parent 8084ae4 commit 031319f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/gui/generalsettings.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ void GeneralSettings::loadMiscSettings()
279279
_ui->stopExistingFolderNowBigSyncCheckBox->setChecked(_ui->existingFolderLimitCheckBox->isChecked() && cfgFile.stopSyncingExistingFoldersOverLimit());
280280
_ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage());
281281
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
282+
283+
#if defined(BUILD_UPDATER)
284+
auto validUpdateChannels = cfgFile.validUpdateChannels();
285+
_ui->updateChannel->addItems(validUpdateChannels);
286+
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.updateChannel());
287+
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
288+
connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
289+
#endif
282290
}
283291

284292
#if defined(BUILD_UPDATER)
@@ -292,9 +300,6 @@ void GeneralSettings::slotUpdateInfo()
292300
return;
293301
}
294302

295-
const auto validUpdateChannels = config.validUpdateChannels();
296-
_ui->updateChannel->addItems(validUpdateChannels);
297-
298303
if (updater) {
299304
connect(_ui->updateButton,
300305
&QAbstractButton::clicked,
@@ -338,11 +343,6 @@ void GeneralSettings::slotUpdateInfo()
338343
_ui->updateButton->setEnabled(enableUpdateButton);
339344
}
340345
#endif
341-
342-
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(config.updateChannel());
343-
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
344-
connect(_ui->updateChannel, &QComboBox::currentTextChanged,
345-
this, &GeneralSettings::slotUpdateChannelChanged, Qt::UniqueConnection);
346346
}
347347

348348
void GeneralSettings::slotUpdateChannelChanged()
@@ -360,6 +360,10 @@ void GeneralSettings::slotUpdateChannelChanged()
360360
return tr("daily");
361361
}
362362

363+
if (channel == QStringLiteral("enterprise")) {
364+
return tr("enterprise");
365+
}
366+
363367
return QString{};
364368
};
365369

0 commit comments

Comments
 (0)