X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Ftaskbarnotificationbackend.cpp;h=456d1672fe639b5472913f8fe5ae26ab72ee1e03;hb=2c8434f74c68194d56f2084f637419123e61d18b;hp=c4c8f71ab9bbd439a0ca42cdbfcf2ffda27e43b9;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c;p=quassel.git diff --git a/src/qtui/taskbarnotificationbackend.cpp b/src/qtui/taskbarnotificationbackend.cpp index c4c8f71a..456d1672 100644 --- a/src/qtui/taskbarnotificationbackend.cpp +++ b/src/qtui/taskbarnotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,15 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "taskbarnotificationbackend.h" + #include #include #include -#include #include -#include "taskbarnotificationbackend.h" - #include "clientsettings.h" +#include "icon.h" #include "mainwin.h" #include "qtui.h" @@ -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); } @@ -78,13 +78,13 @@ SettingsPage *TaskbarNotificationBackend::createConfigWidget() const TaskbarNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) : SettingsPage("Internal", "TaskbarNotification", parent) { - QHBoxLayout *layout = new QHBoxLayout(this); + auto *layout = new QHBoxLayout(this); #ifdef Q_OS_MAC layout->addWidget(enabledBox = new QCheckBox(tr("Activate dock entry, timeout:"), this)); #else layout->addWidget(enabledBox = new QCheckBox(tr("Mark taskbar entry, timeout:"), this)); #endif - enabledBox->setIcon(QIcon::fromTheme("flag-blue")); + enabledBox->setIcon(icon::get("flag-blue")); enabledBox->setEnabled(true); timeoutBox = new QSpinBox(this); @@ -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(&QSpinBox::valueChanged), this, &ConfigWidget::widgetChanged); }