From: Camila Ayres Date: Thu, 17 Oct 2024 07:35:02 +0000 (+0200) Subject: Remove checks for the update channel from the getter function. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~75^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a58e64f1320796437276202206c09a760a4a9d6e;p=nextcloud-desktop.git Remove checks for the update channel from the getter function. It should only return the value. Signed-off-by: Camila Ayres --- diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 7e62925c7..1f571de3c 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)