Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-06-19 11:53:49 +0300
committerOlivier Goffart <olivier@woboq.com>2018-06-19 13:56:31 +0300
commitae80317a747207c620638d4f5f6c9ff4e25693a5 (patch)
tree1ea59732026eb229ce17b275acb5ffb58eee486e /src/gui/generalsettings.cpp
parenta0d6139505b2c0f2527769a252e199c37d751781 (diff)
Updater: Fix beta channel for translated clients.
The names in the combobox are being translated, so we need to rely on the index rather than the text.
Diffstat (limited to 'src/gui/generalsettings.cpp')
-rw-r--r--src/gui/generalsettings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index 39552c327..783518798 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -157,12 +157,13 @@ void GeneralSettings::slotUpdateInfo()
// Channel selection
_ui->updateChannel->setCurrentIndex(ConfigFile().updateChannel() == "beta" ? 1 : 0);
- connect(_ui->updateChannel, &QComboBox::currentTextChanged,
+ connect(_ui->updateChannel, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &GeneralSettings::slotUpdateChannelChanged, Qt::UniqueConnection);
}
-void GeneralSettings::slotUpdateChannelChanged(const QString &channel)
+void GeneralSettings::slotUpdateChannelChanged(int index)
{
+ QString channel = index == 0 ? QStringLiteral("stable") : QStringLiteral("beta");
if (channel == ConfigFile().updateChannel())
return;