all repos — mgba @ 615ab298d196efb5e9311101fd8687bbce2727c5

mGBA Game Boy Advance Emulator

Qt: Fix locale with settings
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 16:31:47 -0700
commit

615ab298d196efb5e9311101fd8687bbce2727c5

parent

39a8f528c084514f3a79877cd846824342c51d67

2 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/platform/qt/SettingsView.cppsrc/platform/qt/SettingsView.cpp

@@ -165,7 +165,7 @@ saveSetting(key, field->lineEdit());

} void SettingsView::saveSetting(const char* key, const QDoubleSpinBox* field) { - saveSetting(key, field->cleanText()); + saveSetting(key, field->value()); } void SettingsView::saveSetting(const char* key, const QLineEdit* field) {

@@ -173,14 +173,14 @@ saveSetting(key, field->text());

} void SettingsView::saveSetting(const char* key, const QSlider* field) { - saveSetting(key, QString::number(field->value())); + saveSetting(key, field->value()); } void SettingsView::saveSetting(const char* key, const QSpinBox* field) { - saveSetting(key, field->cleanText()); + saveSetting(key, field->value()); } -void SettingsView::saveSetting(const char* key, const QString& field) { +void SettingsView::saveSetting(const char* key, const QVariant& field) { m_controller->setOption(key, field); m_controller->updateOption(key); }
M src/platform/qt/SettingsView.hsrc/platform/qt/SettingsView.h

@@ -40,7 +40,7 @@ void saveSetting(const char* key, const QDoubleSpinBox*);

void saveSetting(const char* key, const QLineEdit*); void saveSetting(const char* key, const QSlider*); void saveSetting(const char* key, const QSpinBox*); - void saveSetting(const char* key, const QString&); + void saveSetting(const char* key, const QVariant&); void loadSetting(const char* key, QAbstractButton*); void loadSetting(const char* key, QComboBox*);