From d9c1b94f03b0a9ad0207cfe37af2c201d9dec045 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Wed, 29 May 2019 00:29:43 +0200 Subject: [PATCH] yuzu: Remove unused birthday setting Fixes #2522. --- src/yuzu/configuration/configure_system.cpp | 45 ----- src/yuzu/configuration/configure_system.h | 3 - src/yuzu/configuration/configure_system.ui | 182 ++++++-------------- 3 files changed, 52 insertions(+), 178 deletions(-) diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index ff18ace407..e588b21f20 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -16,28 +16,8 @@ #include "ui_configure_system.h" #include "yuzu/configuration/configure_system.h" -namespace { -constexpr std::array days_in_month = {{ - 31, - 29, - 31, - 30, - 31, - 30, - 31, - 31, - 30, - 31, - 30, - 31, -}}; -} // Anonymous namespace - ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { ui->setupUi(this); - connect(ui->combo_birthmonth, - static_cast(&QComboBox::currentIndexChanged), this, - &ConfigureSystem::UpdateBirthdayComboBox); connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, &ConfigureSystem::RefreshConsoleID); @@ -101,31 +81,6 @@ void ConfigureSystem::applyConfiguration() { Settings::Apply(); } -void ConfigureSystem::UpdateBirthdayComboBox(int birthmonth_index) { - if (birthmonth_index < 0 || birthmonth_index >= 12) - return; - - // store current day selection - int birthday_index = ui->combo_birthday->currentIndex(); - - // get number of days in the new selected month - int days = days_in_month[birthmonth_index]; - - // if the selected day is out of range, - // reset it to 1st - if (birthday_index < 0 || birthday_index >= days) - birthday_index = 0; - - // update the day combo box - ui->combo_birthday->clear(); - for (int i = 1; i <= days; ++i) { - ui->combo_birthday->addItem(QString::number(i)); - } - - // restore the day selection - ui->combo_birthday->setCurrentIndex(birthday_index); -} - void ConfigureSystem::RefreshConsoleID() { QMessageBox::StandardButton reply; QString warning_text = tr("This will replace your current virtual Switch with a new one. " diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index cf1e54de54..41d03c56f1 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h @@ -26,14 +26,11 @@ public: private: void ReadSystemSettings(); - void UpdateBirthdayComboBox(int birthmonth_index); void RefreshConsoleID(); std::unique_ptr ui; bool enabled = false; - int birthmonth = 0; - int birthday = 0; int language_index = 0; int sound_index = 0; }; diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui index 0733272987..65745a2f8c 100644 --- a/src/yuzu/configuration/configure_system.ui +++ b/src/yuzu/configuration/configure_system.ui @@ -22,14 +22,21 @@ System Settings - + Sound output mode - + + + + Console ID: + + + + Note: this can be overridden when region setting is auto-select @@ -121,108 +128,14 @@ - - - - - - - January - - - - - February - - - - - March - - - - - April - - - - - May - - - - - June - - - - - July - - - - - August - - - - - September - - - - - October - - - - - November - - - - - December - - - - - - - - - - - + + - Console ID: + RNG Seed - - - - Birthday - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - Regenerate - - - - + @@ -241,21 +154,51 @@ - - - - RNG Seed - - - - + Language - + + + + + 0 + 0 + + + + Qt::RightToLeft + + + Regenerate + + + + + + + Custom RTC + + + + + + + + 1970 + 1 + 1 + + + + d MMM yyyy h:mm:ss AP + + + + @@ -276,27 +219,6 @@ - - - - Custom RTC - - - - - - - - 1970 - 1 - 1 - - - - d MMM yyyy h:mm:ss AP - - -