Commit a6ae546a authored by Laurent Montel's avatar Laurent Montel 😁

USe qoverload

parent bae7458e
......@@ -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();
......
......@@ -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);
......
......@@ -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);
......
......@@ -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();
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment