@@ -279,6 +279,18 @@ 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+ if (const auto serverHasValidSubscription = cfgFile.serverHasValidSubscription ();
286+ serverHasValidSubscription) {
287+ validUpdateChannels << QStringLiteral (" enterprise" );
288+ }
289+ _ui->updateChannel ->addItems (validUpdateChannels);
290+ const auto currentUpdateChannelIndex = validUpdateChannels.indexOf (cfgFile.updateChannel ());
291+ _ui->updateChannel ->setCurrentIndex (currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0 );
292+ connect (_ui->updateChannel , &QComboBox::currentTextChanged, this , &GeneralSettings::slotUpdateChannelChanged);
293+ #endif
282294}
283295
284296#if defined(BUILD_UPDATER)
@@ -292,9 +304,6 @@ void GeneralSettings::slotUpdateInfo()
292304 return ;
293305 }
294306
295- const auto validUpdateChannels = config.validUpdateChannels ();
296- _ui->updateChannel ->addItems (validUpdateChannels);
297-
298307 if (updater) {
299308 connect (_ui->updateButton ,
300309 &QAbstractButton::clicked,
@@ -338,11 +347,6 @@ void GeneralSettings::slotUpdateInfo()
338347 _ui->updateButton ->setEnabled (enableUpdateButton);
339348 }
340349#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);
346350}
347351
348352void GeneralSettings::slotUpdateChannelChanged ()
@@ -360,6 +364,10 @@ void GeneralSettings::slotUpdateChannelChanged()
360364 return tr (" daily" );
361365 }
362366
367+ if (channel == QStringLiteral (" enterprise" )) {
368+ return tr (" enterprise" );
369+ }
370+
363371 return QString{};
364372 };
365373
0 commit comments