Fix hasDefaults() for NotificationsSettingsPage
[quassel.git] / src / qtui / settingspages / notificationssettingspage.cpp
index 3407ac5..3be5ba9 100644 (file)
@@ -25,7 +25,9 @@
 #include "qtui.h"
 
 NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
-  : SettingsPage(tr("Behaviour"), tr("Notifications"), parent) {
+  : SettingsPage(tr("Behaviour"), tr("Notifications"), parent),
+  _hasDefaults(false)
+{
 
   QVBoxLayout *layout = new QVBoxLayout(this);
   foreach(AbstractNotificationBackend *backend, QtUi::notificationBackends()) {
@@ -35,6 +37,7 @@ NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
       _configWidgets.append(cw);
       layout->addWidget(cw);
       connect(cw, SIGNAL(changed(bool)), SLOT(widgetHasChanged()));
+      _hasDefaults |= cw->hasDefaults();
     }
   }
   layout->addStretch(1);
@@ -42,7 +45,7 @@ NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
 }
 
 bool NotificationsSettingsPage::hasDefaults() const {
-  return true;
+  return _hasDefaults;
 }
 
 void NotificationsSettingsPage::defaults() {