From 6dbccb6a28b1f72347548b31f68031d4cabb594d Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Wed, 13 Jun 2018 22:36:28 -0500 Subject: [PATCH] client: Fix SettingsPage::hasChanged() failure Fix SettingsPage::hasChanged() to compare with the correct property, "storedValue", instead of "StoredValue". This resulted in the settings page sometimes errantly marking values as not changed when they were, or vice-versa. Some settings pages could probably be cleaned up now that this is fixed. That is left for future cleanup efforts. --- src/uisupport/settingspage.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/uisupport/settingspage.cpp b/src/uisupport/settingspage.cpp index 9e9551ae..bb9d9344 100644 --- a/src/uisupport/settingspage.cpp +++ b/src/uisupport/settingspage.cpp @@ -50,40 +50,41 @@ void SettingsPage::setChangedState(bool hasChanged_) void SettingsPage::load(QCheckBox *box, bool checked) { - box->setProperty("StoredValue", checked); + box->setProperty("storedValue", checked); box->setChecked(checked); } bool SettingsPage::hasChanged(QCheckBox *box) { - return box->property("StoredValue").toBool() != box->isChecked(); + return box->property("storedValue").toBool() != box->isChecked(); } void SettingsPage::load(QComboBox *box, int index) { - box->setProperty("StoredValue", index); + box->setProperty("storedValue", index); box->setCurrentIndex(index); } bool SettingsPage::hasChanged(QComboBox *box) { - return box->property("StoredValue").toInt() != box->currentIndex(); + return box->property("storedValue").toInt() != box->currentIndex(); } void SettingsPage::load(QSpinBox *box, int value) { - box->setProperty("StoredValue", value); + box->setProperty("storedValue", value); box->setValue(value); } bool SettingsPage::hasChanged(QSpinBox *box) { - return box->property("StoredValue").toInt() != box->value(); + return box->property("storedValue").toInt() != box->value(); +} } -- 2.20.1