From d7ce330345bb9e9448977fdf6b981fd8883749ed Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Mon, 30 May 2022 01:18:30 -0700 Subject: [PATCH] hide auto update settings --- .../Core/DolphinQt/Settings/GeneralPane.cpp | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 16f78fffa2..64c2552a7c 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -27,7 +27,6 @@ #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/Settings.h" -#include "UICommon/AutoUpdate.h" #ifdef USE_DISCORD_PRESENCE #include "UICommon/DiscordPresence.h" #endif @@ -66,9 +65,6 @@ void GeneralPane::CreateLayout() // Create layout here CreateBasic(); - if (AutoUpdateChecker::SystemSupportsAutoUpdates()) - CreateAutoUpdate(); - CreateFallbackRegion(); #if defined(USE_ANALYTICS) && USE_ANALYTICS @@ -104,14 +100,6 @@ void GeneralPane::ConnectLayout() connect(m_checkbox_discord_presence, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); #endif - if (AutoUpdateChecker::SystemSupportsAutoUpdates()) - { - connect(m_combobox_update_track, qOverload(&QComboBox::currentIndexChanged), this, - &GeneralPane::OnSaveConfig); - connect(&Settings::Instance(), &Settings::AutoUpdateTrackChanged, this, - &GeneralPane::LoadConfig); - } - // Advanced connect(m_combobox_speedlimit, qOverload(&QComboBox::currentIndexChanged), [this]() { OnSaveConfig(); }); @@ -177,25 +165,6 @@ void GeneralPane::CreateBasic() speed_limit_layout->addRow(tr("&Speed Limit:"), m_combobox_speedlimit); } -void GeneralPane::CreateAutoUpdate() -{ - auto* auto_update_group = new QGroupBox(tr("Auto Update Settings")); - auto* layout = new QFormLayout; - auto_update_group->setLayout(layout); - m_main_layout->addWidget(auto_update_group); - - layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop); - layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - - m_combobox_update_track = new QComboBox(this); - - 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)")}) - m_combobox_update_track->addItem(option); -} - void GeneralPane::CreateFallbackRegion() { auto* fallback_region_group = new QGroupBox(tr("Fallback Region")); @@ -240,20 +209,6 @@ void GeneralPane::CreateAnalytics() void GeneralPane::LoadConfig() { - if (AutoUpdateChecker::SystemSupportsAutoUpdates()) - { - const auto track = Settings::Instance().GetAutoUpdateTrack().toStdString(); - - if (track == AUTO_UPDATE_DISABLE_STRING) - m_combobox_update_track->setCurrentIndex(AUTO_UPDATE_DISABLE_INDEX); - else if (track == AUTO_UPDATE_STABLE_STRING) - m_combobox_update_track->setCurrentIndex(AUTO_UPDATE_STABLE_INDEX); - else if (track == AUTO_UPDATE_BETA_STRING) - m_combobox_update_track->setCurrentIndex(AUTO_UPDATE_BETA_INDEX); - else - m_combobox_update_track->setCurrentIndex(AUTO_UPDATE_DEV_INDEX); - } - #if defined(USE_ANALYTICS) && USE_ANALYTICS m_checkbox_enable_analytics->setChecked(Settings::Instance().IsAnalyticsEnabled()); #endif @@ -337,11 +292,6 @@ void GeneralPane::OnSaveConfig() Config::ConfigChangeCallbackGuard config_guard; auto& settings = SConfig::GetInstance(); - if (AutoUpdateChecker::SystemSupportsAutoUpdates()) - { - Settings::Instance().SetAutoUpdateTrack( - UpdateTrackFromIndex(m_combobox_update_track->currentIndex())); - } #ifdef USE_DISCORD_PRESENCE Discord::SetDiscordPresenceEnabled(m_checkbox_discord_presence->isChecked());