From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/citra_qt/configure_system.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/citra_qt/configure_system.cpp') diff --git a/src/citra_qt/configure_system.cpp b/src/citra_qt/configure_system.cpp index 5c5d83ff3..d89b342df 100644 --- a/src/citra_qt/configure_system.cpp +++ b/src/citra_qt/configure_system.cpp @@ -6,19 +6,16 @@ #include "citra_qt/ui_settings.h" #include "ui_configure_system.h" -#include "core/hle/service/fs/archive.h" #include "core/hle/service/cfg/cfg.h" +#include "core/hle/service/fs/archive.h" #include "core/system.h" -static const std::array days_in_month = {{ - 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 -}}; +static const std::array days_in_month = {{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; -ConfigureSystem::ConfigureSystem(QWidget *parent) : - QWidget(parent), - ui(new Ui::ConfigureSystem) { +ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { ui->setupUi(this); - connect(ui->combo_birthmonth, SIGNAL(currentIndexChanged(int)), SLOT(updateBirthdayComboBox(int))); + connect(ui->combo_birthmonth, SIGNAL(currentIndexChanged(int)), + SLOT(updateBirthdayComboBox(int))); this->setConfiguration(); } @@ -54,13 +51,17 @@ void ConfigureSystem::setConfiguration() { void ConfigureSystem::ReadSystemSettings() { // set username username = Service::CFG::GetUsername(); - // ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this when we move to Qt 5.5 - ui->edit_username->setText(QString::fromUtf16(reinterpret_cast(username.data()))); + // ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this + // when we move to Qt 5.5 + ui->edit_username->setText( + QString::fromUtf16(reinterpret_cast(username.data()))); // set birthday std::tie(birthmonth, birthday) = Service::CFG::GetBirthday(); ui->combo_birthmonth->setCurrentIndex(birthmonth - 1); - updateBirthdayComboBox(birthmonth - 1); // explicitly update it because the signal from setCurrentIndex is not reliable + updateBirthdayComboBox( + birthmonth - + 1); // explicitly update it because the signal from setCurrentIndex is not reliable ui->combo_birthday->setCurrentIndex(birthday - 1); // set system language @@ -79,8 +80,10 @@ void ConfigureSystem::applyConfiguration() { bool modified = false; // apply username - // std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele): Use this when we move to Qt 5.5 - std::u16string new_username(reinterpret_cast(ui->edit_username->text().utf16())); + // std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele): + // Use this when we move to Qt 5.5 + std::u16string new_username( + reinterpret_cast(ui->edit_username->text().utf16())); if (new_username != username) { Service::CFG::SetUsername(new_username); modified = true; -- cgit v1.2.3 From 396a8d91a4423d9c793eeff0798d544613647511 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 18 Sep 2016 18:01:46 -0700 Subject: Manually tweak source formatting and then re-run clang-format --- src/citra_qt/configure_system.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/citra_qt/configure_system.cpp') 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 @@ #include "core/hle/service/fs/archive.h" #include "core/system.h" -static const std::array days_in_month = {{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; +static const std::array days_in_month = {{ + 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, +}}; ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { ui->setupUi(this); @@ -20,8 +22,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui:: this->setConfiguration(); } -ConfigureSystem::~ConfigureSystem() { -} +ConfigureSystem::~ConfigureSystem() {} void ConfigureSystem::setConfiguration() { enabled = !System::IsPoweredOn(); @@ -51,8 +52,8 @@ void ConfigureSystem::setConfiguration() { void ConfigureSystem::ReadSystemSettings() { // set username username = Service::CFG::GetUsername(); - // ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this - // when we move to Qt 5.5 + // TODO(wwylele): Use this when we move to Qt 5.5 + // ui->edit_username->setText(QString::fromStdU16String(username)); ui->edit_username->setText( QString::fromUtf16(reinterpret_cast(username.data()))); @@ -80,8 +81,8 @@ void ConfigureSystem::applyConfiguration() { bool modified = false; // apply username - // std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele): - // Use this when we move to Qt 5.5 + // TODO(wwylele): Use this when we move to Qt 5.5 + // std::u16string new_username = ui->edit_username->text().toStdU16String(); std::u16string new_username( reinterpret_cast(ui->edit_username->text().utf16())); if (new_username != username) { -- cgit v1.2.3 From ebdae19fd226104baec712b9da9939ff82ef3c3a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 21 Sep 2016 00:21:23 +0900 Subject: Remove empty newlines in #include blocks. This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. --- src/citra_qt/configure_system.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/citra_qt/configure_system.cpp') diff --git a/src/citra_qt/configure_system.cpp b/src/citra_qt/configure_system.cpp index 732e15dda..873d314ec 100644 --- a/src/citra_qt/configure_system.cpp +++ b/src/citra_qt/configure_system.cpp @@ -4,11 +4,10 @@ #include "citra_qt/configure_system.h" #include "citra_qt/ui_settings.h" -#include "ui_configure_system.h" - #include "core/hle/service/cfg/cfg.h" #include "core/hle/service/fs/archive.h" #include "core/system.h" +#include "ui_configure_system.h" static const std::array days_in_month = {{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, -- cgit v1.2.3