DolphinQt/Settings: remove 'stable' track from auto-updater options

We've decided this track will never be used in the future. Releases will
continue using the "beta" branch internally, though we'll have the
user-visible strings use a different name instead.

(Note: Dolphin provided builds have always defaulted to 'beta' as the
auto-update track, so anyone who set 'stable' did so manually.)
This commit is contained in:
Pierre Bourdon 2023-01-17 08:28:40 +01:00
parent 10fd768898
commit 3342947446
No known key found for this signature in database
GPG Key ID: 6FB80DCD84DA0F1C

View File

@ -33,12 +33,10 @@
#endif
constexpr int AUTO_UPDATE_DISABLE_INDEX = 0;
constexpr int AUTO_UPDATE_STABLE_INDEX = 1;
constexpr int AUTO_UPDATE_BETA_INDEX = 2;
constexpr int AUTO_UPDATE_DEV_INDEX = 3;
constexpr int AUTO_UPDATE_BETA_INDEX = 1;
constexpr int AUTO_UPDATE_DEV_INDEX = 2;
constexpr const char* AUTO_UPDATE_DISABLE_STRING = "";
constexpr const char* AUTO_UPDATE_STABLE_STRING = "stable";
constexpr const char* AUTO_UPDATE_BETA_STRING = "beta";
constexpr const char* AUTO_UPDATE_DEV_STRING = "dev";
@ -191,8 +189,8 @@ void GeneralPane::CreateAutoUpdate()
auto_update_group_layout->addRow(tr("&Auto Update:"), m_combobox_update_track);
for (const QString& option : {tr("Don't Update"), tr("Stable (once a year)"),
tr("Beta (once a month)"), tr("Dev (multiple times a day)")})
for (const QString& option :
{tr("Don't Update"), tr("Beta (once a month)"), tr("Dev (multiple times a day)")})
m_combobox_update_track->addItem(option);
}
@ -244,14 +242,15 @@ void GeneralPane::LoadConfig()
if (AutoUpdateChecker::SystemSupportsAutoUpdates())
{
const auto track = Settings::Instance().GetAutoUpdateTrack().toStdString();
// If the track doesn't match any known value, set to "beta" which is the
// default config value on Dolphin release builds.
if (track == AUTO_UPDATE_DISABLE_STRING)
SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_DISABLE_INDEX);
else if (track == AUTO_UPDATE_STABLE_STRING)
SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_STABLE_INDEX);
else if (track == AUTO_UPDATE_BETA_STRING)
SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_BETA_INDEX);
else
else if (track == AUTO_UPDATE_DEV_STRING)
SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_DEV_INDEX);
else
SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_BETA_INDEX);
}
#if defined(USE_ANALYTICS) && USE_ANALYTICS
@ -295,9 +294,6 @@ static QString UpdateTrackFromIndex(int index)
case AUTO_UPDATE_DISABLE_INDEX:
value = QString::fromStdString(AUTO_UPDATE_DISABLE_STRING);
break;
case AUTO_UPDATE_STABLE_INDEX:
value = QString::fromStdString(AUTO_UPDATE_STABLE_STRING);
break;
case AUTO_UPDATE_BETA_INDEX:
value = QString::fromStdString(AUTO_UPDATE_BETA_STRING);
break;