summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-08 13:22:16 +0200
committerMontel Laurent <[email protected]>2017-08-08 13:22:16 +0200
commita6ae546a993b70979c0e96de9e1478262786ba0b (patch)
treee34316743a37e15703c464292de08af3ce01a828
parentbae7458e7e8ad0196e5b15b8611cc61503438178 (diff)
USe qoverload
-rw-r--r--agents/newmailnotifier/specialnotifierjob.cpp2
-rw-r--r--resources/dav/resource/urlconfigurationdialog.cpp2
-rw-r--r--resources/google/common/googlesettingsdialog.cpp2
-rw-r--r--resources/imap/setupserver.cpp4
-rw-r--r--resources/pop3/accountdialog.cpp8
5 files changed, 9 insertions, 9 deletions
diff --git a/agents/newmailnotifier/specialnotifierjob.cpp b/agents/newmailnotifier/specialnotifierjob.cpp
index 0d9312b..1cd72ca 100644
--- a/agents/newmailnotifier/specialnotifierjob.cpp
+++ b/agents/newmailnotifier/specialnotifierjob.cpp
@@ -160,7 +160,7 @@ void SpecialNotifierJob::emitNotification(const QPixmap &pixmap)
notification->setPixmap(pixmap);
notification->setActions(QStringList() << i18n("Show mail..."));
- connect(notification, static_cast<void (KNotification::*)(unsigned int)>(&KNotification::activated), this, &SpecialNotifierJob::slotOpenMail);
+ connect(notification, QOverload<unsigned int>::of(&KNotification::activated), this, &SpecialNotifierJob::slotOpenMail);
connect(notification, &KNotification::closed, this, &SpecialNotifierJob::deleteLater);
notification->sendEvent();
diff --git a/resources/dav/resource/urlconfigurationdialog.cpp b/resources/dav/resource/urlconfigurationdialog.cpp
index 309a4e6..d3fe830 100644
--- a/resources/dav/resource/urlconfigurationdialog.cpp
+++ b/resources/dav/resource/urlconfigurationdialog.cpp
@@ -60,7 +60,7 @@ UrlConfigurationDialog::UrlConfigurationDialog(QWidget *parent)
mRemoteProtocolGroup->addButton(mUi.caldav, KDAV::CalDav);
mRemoteProtocolGroup->addButton(mUi.carddav, KDAV::CardDav);
mRemoteProtocolGroup->addButton(mUi.groupdav, KDAV::GroupDav);
- connect(mRemoteProtocolGroup, static_cast<void(QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled), this, &UrlConfigurationDialog::onConfigChanged);
+ connect(mRemoteProtocolGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.remoteUrl, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.useDefaultCreds, &QRadioButton::toggled, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.username, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
diff --git a/resources/google/common/googlesettingsdialog.cpp b/resources/google/common/googlesettingsdialog.cpp
index b02ad53..db8cd8a 100644
--- a/resources/google/common/googlesettingsdialog.cpp
+++ b/resources/google/common/googlesettingsdialog.cpp
@@ -73,7 +73,7 @@ GoogleSettingsDialog::GoogleSettingsDialog(GoogleAccountManager *accountManager,
m_accComboBox = new KComboBox(m_accGroupBox);
accLayout->addWidget(m_accComboBox, 1);
- connect(m_accComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentIndexChanged), this, &GoogleSettingsDialog::currentAccountChanged);
+ connect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_addAccButton = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add-user")), i18n("&Add"), m_accGroupBox);
accLayout->addWidget(m_addAccButton);
diff --git a/resources/imap/setupserver.cpp b/resources/imap/setupserver.cpp
index a802225..48681b6 100644
--- a/resources/imap/setupserver.cpp
+++ b/resources/imap/setupserver.cpp
@@ -183,8 +183,8 @@ SetupServer::SetupServer(ImapResourceBase *parentResource, WId parent)
connect(m_ui->useDefaultIdentityCheck, &QCheckBox::toggled, this, &SetupServer::slotIdentityCheckboxChanged);
connect(m_ui->enableMailCheckBox, &QCheckBox::toggled, this, &SetupServer::slotMailCheckboxChanged);
- connect(m_ui->safeImapGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &SetupServer::slotEncryptionRadioChanged);
- connect(m_ui->customSieveGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &SetupServer::slotCustomSieveChanged);
+ connect(m_ui->safeImapGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &SetupServer::slotEncryptionRadioChanged);
+ connect(m_ui->customSieveGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &SetupServer::slotCustomSieveChanged);
connect(m_ui->showServerInfo, &QPushButton::pressed, this, &SetupServer::slotShowServerInfo);
readSettings();
diff --git a/resources/pop3/accountdialog.cpp b/resources/pop3/accountdialog.cpp
index 398f181..0cae94f 100644
--- a/resources/pop3/accountdialog.cpp
+++ b/resources/pop3/accountdialog.cpp
@@ -123,12 +123,12 @@ void AccountDialog::setupWidgets()
connect(leaveOnServerCheck, &QCheckBox::clicked, this, &AccountDialog::slotLeaveOnServerClicked);
connect(leaveOnServerDaysCheck, &QCheckBox::toggled, this, &AccountDialog::slotEnableLeaveOnServerDays);
- connect(leaveOnServerDaysSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &AccountDialog::slotLeaveOnServerDaysChanged);
+ connect(leaveOnServerDaysSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &AccountDialog::slotLeaveOnServerDaysChanged);
connect(leaveOnServerCountCheck, &QCheckBox::toggled, this, &AccountDialog::slotEnableLeaveOnServerCount);
- connect(leaveOnServerCountSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &AccountDialog::slotLeaveOnServerCountChanged);
+ connect(leaveOnServerCountSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &AccountDialog::slotLeaveOnServerCountChanged);
connect(leaveOnServerSizeCheck, &QCheckBox::toggled, this, &AccountDialog::slotEnableLeaveOnServerSize);
- connect(filterOnServerSizeSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &AccountDialog::slotFilterOnServerSizeChanged);
+ connect(filterOnServerSizeSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &AccountDialog::slotFilterOnServerSizeChanged);
connect(filterOnServerCheck, &QCheckBox::toggled, filterOnServerSizeSpin, &QSpinBox::setEnabled);
connect(filterOnServerCheck, &QCheckBox::clicked, this, &AccountDialog::slotFilterOnServerClicked);
@@ -141,7 +141,7 @@ void AccountDialog::setupWidgets()
encryptionButtonGroup->addButton(encryptionTLS,
Transport::EnumEncryption::TLS);
- connect(encryptionButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &AccountDialog::slotPopEncryptionChanged);
+ connect(encryptionButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &AccountDialog::slotPopEncryptionChanged);
connect(intervalCheck, &QCheckBox::toggled, this, &AccountDialog::slotEnablePopInterval);
populateDefaultAuthenticationOptions();