modernize: Prefer default member init over ctor init
[quassel.git] / src / qtui / settingspages / coreaccountsettingspage.cpp
index 0ccf5ad..3a6f1cd 100644 (file)
@@ -28,8 +28,7 @@
 CoreAccountSettingsPage::CoreAccountSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), QString(), parent),
     _lastAccountId(0),
 CoreAccountSettingsPage::CoreAccountSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), QString(), parent),
     _lastAccountId(0),
-    _lastAutoConnectId(0),
-    _standalone(false)
+    _lastAutoConnectId(0)
 {
     ui.setupUi(this);
     initAutoWidgets();
 {
     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();
     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,8 +225,10 @@ void CoreAccountSettingsPage::widgetHasChanged()
 
 bool CoreAccountSettingsPage::testHasChanged()
 {
 
 bool CoreAccountSettingsPage::testHasChanged()
 {
-    if (ui.autoConnectAccount->currentIndex() != ui.autoConnectAccount->property("storedValue").toInt())
+    if (ui.autoConnectAccount->currentIndex() !=
+            ui.autoConnectAccount->property("storedValue").toInt()) {
         return true;
         return true;
+    }
     if (*model() != *Client::coreAccountModel()) {
         return true;
     }
     if (*model() != *Client::coreAccountModel()) {
         return true;
     }