@@ -720,7 +720,9 @@ QString ConfigFile::defaultUpdateChannel() const
720720QString ConfigFile::currentUpdateChannel () const
721721{
722722 QSettings settings (configFile (), QSettings::IniFormat);
723- return settings.value (QLatin1String (updateChannelC), defaultUpdateChannel ()).toString ();
723+ const auto currentChannel = UpdateChannel::fromString (settings.value (QLatin1String (updateChannelC), defaultUpdateChannel ()).toString ());
724+ const auto enterpriseChannel = UpdateChannel::fromString (desktopEnterpriseChannel ());
725+ return UpdateChannel::mostStable (currentChannel, enterpriseChannel).toString ();
724726}
725727
726728void ConfigFile::setUpdateChannel (const QString &channel)
@@ -1215,10 +1217,9 @@ QString ConfigFile::desktopEnterpriseChannel() const
12151217void ConfigFile::setDesktopEnterpriseChannel (const QString &channel)
12161218{
12171219 QSettings settings (configFile (), QSettings::IniFormat);
1218- settings.setValue (QLatin1String (desktopEnterpriseChannelName), channel);
1219- const auto currentUpdateChannel = UpdateChannel::fromString (this ->currentUpdateChannel ());
1220+ const auto currentEnterpriseChannel = UpdateChannel::fromString (desktopEnterpriseChannel ());
12201221 const auto newEnterpriseUpdateChannel = UpdateChannel::fromString (channel);
1221- setUpdateChannel ( UpdateChannel::mostStable (currentUpdateChannel , newEnterpriseUpdateChannel).toString ());
1222+ settings. setValue ( QLatin1String (desktopEnterpriseChannelName), UpdateChannel::mostStable (currentEnterpriseChannel , newEnterpriseUpdateChannel).toString ());
12221223}
12231224
12241225QString ConfigFile::language () const
0 commit comments