X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.cpp;h=a1b6f8db17492c3914056adced4aef88d4f34004;hp=de82f69ec22f06221d1d3773e76d60493dbd7ac8;hb=e4fd091bc38c923853f54902cc873da832619c5d;hpb=f824db0e31b54969e0b7fa0b5405b1e9173d482c diff --git a/src/uisupport/settingspage.cpp b/src/uisupport/settingspage.cpp index de82f69e..a1b6f8db 100644 --- a/src/uisupport/settingspage.cpp +++ b/src/uisupport/settingspage.cpp @@ -53,7 +53,7 @@ void SettingsPage::load(QCheckBox *box, bool checked) { } bool SettingsPage::hasChanged(QCheckBox *box) { - return box->property("StoredValue").toBool() == box->isChecked(); + return box->property("StoredValue").toBool() != box->isChecked(); } @@ -63,7 +63,7 @@ void SettingsPage::load(QComboBox *box, int 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) { @@ -72,7 +72,7 @@ void SettingsPage::load(QSpinBox *box, int value) { } bool SettingsPage::hasChanged(QSpinBox *box) { - return box->property("StoredValue").toInt() == box->value(); + return box->property("StoredValue").toInt() != box->value(); } /*** Auto child widget handling ***/ @@ -88,7 +88,7 @@ void SettingsPage::initAutoWidgets() { findAutoWidgets(this, &_autoWidgets); foreach(QObject *widget, _autoWidgets) { - if(widget->inherits("QAbstractButton")) + if(widget->inherits("QAbstractButton") || widget->inherits("QGroupBox")) connect(widget, SIGNAL(toggled(bool)), SLOT(autoWidgetHasChanged())); else if(widget->inherits("QLineEdit") || widget->inherits("QTextEdit")) connect(widget, SIGNAL(textChanged(const QString &)), SLOT(autoWidgetHasChanged())); @@ -111,7 +111,7 @@ void SettingsPage::findAutoWidgets(QObject *parent, QObjectList *autoList) const QByteArray SettingsPage::autoWidgetPropertyName(QObject *widget) const { QByteArray prop; - if(widget->inherits("QAbstractButton")) + if(widget->inherits("QAbstractButton") || widget->inherits("QGroupBox")) prop = "checked"; else if(widget->inherits("QLineEdit") || widget->inherits("QTextEdit")) prop = "text";