modernize: Require member function pointers for Settings::notify()
[quassel.git] / src / qtui / taskbarnotificationbackend.cpp
index 47109bc..456d167 100644 (file)
@@ -37,8 +37,8 @@ TaskbarNotificationBackend::TaskbarNotificationBackend(QObject *parent)
     _enabled = notificationSettings.value("Taskbar/Enabled", true).toBool();
     _timeout = notificationSettings.value("Taskbar/Timeout", 0).toInt();
 
-    notificationSettings.notify("Taskbar/Enabled", this, SLOT(enabledChanged(const QVariant &)));
-    notificationSettings.notify("Taskbar/Timeout", this, SLOT(timeoutChanged(const QVariant &)));
+    notificationSettings.notify("Taskbar/Enabled", this, &TaskbarNotificationBackend::enabledChanged);
+    notificationSettings.notify("Taskbar/Timeout", this, &TaskbarNotificationBackend::timeoutChanged);
 }
 
 
@@ -95,9 +95,9 @@ TaskbarNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) : Settin
     layout->addWidget(timeoutBox);
     layout->addStretch(20);
 
-    connect(enabledBox, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
-    connect(enabledBox, SIGNAL(toggled(bool)), timeoutBox, SLOT(setEnabled(bool)));
-    connect(timeoutBox, SIGNAL(valueChanged(int)), SLOT(widgetChanged()));
+    connect(enabledBox, &QAbstractButton::toggled, this, &ConfigWidget::widgetChanged);
+    connect(enabledBox, &QAbstractButton::toggled, timeoutBox, &QWidget::setEnabled);
+    connect(timeoutBox, selectOverload<int>(&QSpinBox::valueChanged), this, &ConfigWidget::widgetChanged);
 }