diff options
Diffstat (limited to '')
| -rw-r--r-- | src/citra_qt/configure_system.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/citra_qt/configure_system.cpp b/src/citra_qt/configure_system.cpp index d89b342df..732e15dda 100644 --- a/src/citra_qt/configure_system.cpp +++ b/src/citra_qt/configure_system.cpp | |||
| @@ -10,7 +10,9 @@ | |||
| 10 | #include "core/hle/service/fs/archive.h" | 10 | #include "core/hle/service/fs/archive.h" |
| 11 | #include "core/system.h" | 11 | #include "core/system.h" |
| 12 | 12 | ||
| 13 | static const std::array<int, 12> days_in_month = {{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; | 13 | static const std::array<int, 12> days_in_month = {{ |
| 14 | 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, | ||
| 15 | }}; | ||
| 14 | 16 | ||
| 15 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { | 17 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { |
| 16 | ui->setupUi(this); | 18 | ui->setupUi(this); |
| @@ -20,8 +22,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui:: | |||
| 20 | this->setConfiguration(); | 22 | this->setConfiguration(); |
| 21 | } | 23 | } |
| 22 | 24 | ||
| 23 | ConfigureSystem::~ConfigureSystem() { | 25 | ConfigureSystem::~ConfigureSystem() {} |
| 24 | } | ||
| 25 | 26 | ||
| 26 | void ConfigureSystem::setConfiguration() { | 27 | void ConfigureSystem::setConfiguration() { |
| 27 | enabled = !System::IsPoweredOn(); | 28 | enabled = !System::IsPoweredOn(); |
| @@ -51,8 +52,8 @@ void ConfigureSystem::setConfiguration() { | |||
| 51 | void ConfigureSystem::ReadSystemSettings() { | 52 | void ConfigureSystem::ReadSystemSettings() { |
| 52 | // set username | 53 | // set username |
| 53 | username = Service::CFG::GetUsername(); | 54 | username = Service::CFG::GetUsername(); |
| 54 | // ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this | 55 | // TODO(wwylele): Use this when we move to Qt 5.5 |
| 55 | // when we move to Qt 5.5 | 56 | // ui->edit_username->setText(QString::fromStdU16String(username)); |
| 56 | ui->edit_username->setText( | 57 | ui->edit_username->setText( |
| 57 | QString::fromUtf16(reinterpret_cast<const ushort*>(username.data()))); | 58 | QString::fromUtf16(reinterpret_cast<const ushort*>(username.data()))); |
| 58 | 59 | ||
| @@ -80,8 +81,8 @@ void ConfigureSystem::applyConfiguration() { | |||
| 80 | bool modified = false; | 81 | bool modified = false; |
| 81 | 82 | ||
| 82 | // apply username | 83 | // apply username |
| 83 | // std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele): | 84 | // TODO(wwylele): Use this when we move to Qt 5.5 |
| 84 | // Use this when we move to Qt 5.5 | 85 | // std::u16string new_username = ui->edit_username->text().toStdU16String(); |
| 85 | std::u16string new_username( | 86 | std::u16string new_username( |
| 86 | reinterpret_cast<const char16_t*>(ui->edit_username->text().utf16())); | 87 | reinterpret_cast<const char16_t*>(ui->edit_username->text().utf16())); |
| 87 | if (new_username != username) { | 88 | if (new_username != username) { |