modernize: Prefer default member init over ctor init
[quassel.git] / src / qtui / settingspages / coreaccountsettingspage.cpp
index 870f78c..3a6f1cd 100644 (file)
@@ -28,8 +28,7 @@
 CoreAccountSettingsPage::CoreAccountSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), QString(), parent),
     _lastAccountId(0),
-    _lastAutoConnectId(0),
-    _standalone(false)
+    _lastAutoConnectId(0)
 {
     ui.setupUi(this);
     initAutoWidgets();
@@ -81,6 +80,8 @@ void CoreAccountSettingsPage::load()
     ui.autoConnectAccount->setCurrentIndex(idx.isValid() ? idx.row() : 0);
     ui.autoConnectAccount->setProperty("storedValue", ui.autoConnectAccount->currentIndex());
     setWidgetStates();
+    // Mark as no changes made, we just loaded settings
+    setChangedState(false);
 }
 
 
@@ -224,10 +225,13 @@ void CoreAccountSettingsPage::widgetHasChanged()
 
 bool CoreAccountSettingsPage::testHasChanged()
 {
-    if (ui.autoConnectAccount->currentIndex() != ui.autoConnectAccount->property("storedValue").toInt())
+    if (ui.autoConnectAccount->currentIndex() !=
+            ui.autoConnectAccount->property("storedValue").toInt()) {
         return true;
-    if (!(*model() == *Client::coreAccountModel()))
+    }
+    if (*model() != *Client::coreAccountModel()) {
         return true;
+    }
 
     return false;
 }