Commit e92ab8c1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent c19ac7fd
Pipeline #77321 failed with stage
in 25 minutes and 56 seconds
......@@ -58,7 +58,7 @@ Row::Row(const QSharedPointer<MigratorBase> &migrator, MigratorModel &model)
, mModel(model)
{
connect(migrator.data(), &MigratorBase::stateChanged, this, &Row::stateChanged);
connect(migrator.data(), QOverload<int>::of(&MigratorBase::progress), this, &Row::progress);
connect(migrator.data(), qOverload<int>(&MigratorBase::progress), this, &Row::progress);
}
bool Row::operator==(const Row &other) const
......
......@@ -55,7 +55,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
NewMailNotifierAgentSettings::instance(KSharedConfig::openConfig());
mIdentityManager = KIdentityManagement::IdentityManager::self();
connect(mIdentityManager, QOverload<>::of(&KIdentityManagement::IdentityManager::changed), this, &NewMailNotifierAgent::slotIdentitiesChanged);
connect(mIdentityManager, qOverload<>(&KIdentityManagement::IdentityManager::changed), this, &NewMailNotifierAgent::slotIdentitiesChanged);
slotIdentitiesChanged();
mDefaultIconName = QStringLiteral("kmail");
......
......@@ -166,7 +166,7 @@ void SpecialNotifierJob::emitNotification(const QPixmap &pixmap)
}
notification->setActions(lstActions);
connect(notification, QOverload<unsigned int>::of(&KNotification::activated), this, &SpecialNotifierJob::slotActivateNotificationAction);
connect(notification, qOverload<unsigned int>(&KNotification::activated), this, &SpecialNotifierJob::slotActivateNotificationAction);
connect(notification, &KNotification::closed, this, &SpecialNotifierJob::deleteLater);
notification->sendEvent();
......
......@@ -65,9 +65,9 @@ int main(int argc, char **argv)
auto migrator = new GidMigrator(mimeType);
if (infoDialog && migrator) {
infoDialog->migratorAdded();
QObject::connect(migrator, &MigratorBase::message, infoDialog, QOverload<MigratorBase::MessageType, const QString &>::of(&InfoDialog::message));
QObject::connect(migrator, &MigratorBase::message, infoDialog, qOverload<MigratorBase::MessageType, const QString &>(&InfoDialog::message));
QObject::connect(migrator, &QObject::destroyed, infoDialog, &InfoDialog::migratorDone);
QObject::connect(migrator, QOverload<int>::of(&MigratorBase::progress), infoDialog, QOverload<int>::of(&InfoDialog::progress));
QObject::connect(migrator, qOverload<int>(&MigratorBase::progress), infoDialog, qOverload<int>(&InfoDialog::progress));
}
QObject::connect(migrator, &GidMigrator::stoppedProcessing, &app, &QApplication::quit);
migrator->start();
......
......@@ -68,7 +68,7 @@ ConfigDialog::ConfigDialog(QWidget *parent)
connect(mUi.configuredUrls->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ConfigDialog::checkConfiguredUrlsButtonsState);
connect(mUi.configuredUrls, &QAbstractItemView::doubleClicked, this, &ConfigDialog::onEditButtonClicked);
connect(mUi.syncRangeStartType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConfigDialog::onSyncRangeStartTypeChanged);
connect(mUi.syncRangeStartType, qOverload<int>(&QComboBox::currentIndexChanged), this, &ConfigDialog::onSyncRangeStartTypeChanged);
connect(mUi.addButton, &QPushButton::clicked, this, &ConfigDialog::onAddButtonClicked);
connect(mUi.searchButton, &QPushButton::clicked, this, &ConfigDialog::onSearchButtonClicked);
connect(mUi.removeButton, &QPushButton::clicked, this, &ConfigDialog::onRemoveButtonClicked);
......
......@@ -169,7 +169,7 @@ EwsConfigDialog::EwsConfigDialog(EwsResource *parentResource, EwsClient &client,
connect(mUi->authOAuth2RadioButton, &QRadioButton::toggled, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_BaseUrl, &QLineEdit::textChanged, this, &EwsConfigDialog::enableTryConnect);
connect(mUi->tryConnectButton, &QPushButton::clicked, this, &EwsConfigDialog::tryConnect);
connect(mUi->userAgentCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EwsConfigDialog::userAgentChanged);
connect(mUi->userAgentCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &EwsConfigDialog::userAgentChanged);
connect(mUi->clearFolderTreeSyncStateButton, &QPushButton::clicked, mParentResource, &EwsResource::clearFolderTreeSyncState);
}
......
......@@ -75,7 +75,7 @@ CollectionStateMonitor<T>::CollectionStateMonitor(QObject *parent,
connect(&mMonitor, &Akonadi::Monitor::collectionAdded, this, [this](const Akonadi::Collection &col, const Akonadi::Collection &) {
stateChanged(col);
});
connect(&mMonitor, QOverload<const Akonadi::Collection &>::of(&Akonadi::Monitor::collectionChanged), this, [this](const Akonadi::Collection &col) {
connect(&mMonitor, qOverload<const Akonadi::Collection &>(&Akonadi::Monitor::collectionChanged), this, [this](const Akonadi::Collection &col) {
stateChanged(col);
});
if (recheckInterval > 0) {
......
......@@ -185,8 +185,8 @@ SetupServer::SetupServer(ImapResourceBase *parentResource, WId parent)
connect(m_ui->sameConfigCheck, &QCheckBox::toggled, this, &SetupServer::slotEnableWidgets);
connect(m_ui->enableMailCheckBox, &QCheckBox::toggled, this, &SetupServer::slotMailCheckboxChanged);
connect(m_ui->safeImapGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), this, &SetupServer::slotEncryptionRadioChanged);
connect(m_ui->customSieveGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), this, &SetupServer::slotCustomSieveChanged);
connect(m_ui->safeImapGroup, qOverload<QAbstractButton *>(&QButtonGroup::buttonClicked), this, &SetupServer::slotEncryptionRadioChanged);
connect(m_ui->customSieveGroup, qOverload<QAbstractButton *>(&QButtonGroup::buttonClicked), this, &SetupServer::slotCustomSieveChanged);
connect(m_ui->showServerInfo, &QPushButton::pressed, this, &SetupServer::slotShowServerInfo);
readSettings();
......
......@@ -74,7 +74,7 @@ SubscriptionDialog::SubscriptionDialog(QWidget *parent, SubscriptionDialog::Subs
m_lineEdit->setFocus();
auto checkBox = new QCheckBox(i18nc("@option:check", "Subscribed only"), mainWidget);
connect(checkBox, &QCheckBox::stateChanged, m_filter, QOverload<int>::of(&SubscriptionFilterProxyModel::setIncludeCheckedOnly));
connect(checkBox, &QCheckBox::stateChanged, m_filter, qOverload<int>(&SubscriptionFilterProxyModel::setIncludeCheckedOnly));
filterBarLayout->addWidget(checkBox);
......
......@@ -97,9 +97,9 @@ void AccountWidget::setupWidgets()
connect(leaveOnServerCheck, &QCheckBox::clicked, this, &AccountWidget::slotLeaveOnServerClicked);
connect(leaveOnServerDaysCheck, &QCheckBox::toggled, this, &AccountWidget::slotEnableLeaveOnServerDays);
connect(leaveOnServerDaysSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &AccountWidget::slotLeaveOnServerDaysChanged);
connect(leaveOnServerDaysSpin, qOverload<int>(&QSpinBox::valueChanged), this, &AccountWidget::slotLeaveOnServerDaysChanged);
connect(leaveOnServerCountCheck, &QCheckBox::toggled, this, &AccountWidget::slotEnableLeaveOnServerCount);
connect(leaveOnServerCountSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &AccountWidget::slotLeaveOnServerCountChanged);
connect(leaveOnServerCountSpin, qOverload<int>(&QSpinBox::valueChanged), this, &AccountWidget::slotLeaveOnServerCountChanged);
connect(leaveOnServerSizeCheck, &QCheckBox::toggled, this, &AccountWidget::slotEnableLeaveOnServerSize);
connect(checkCapabilities, &QPushButton::clicked, this, &AccountWidget::slotCheckPopCapabilities);
......@@ -108,7 +108,7 @@ void AccountWidget::setupWidgets()
encryptionButtonGroup->addButton(encryptionSSL, Transport::EnumEncryption::SSL);
encryptionButtonGroup->addButton(encryptionTLS, Transport::EnumEncryption::TLS);
connect(encryptionButtonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), this, &AccountWidget::slotPopEncryptionChanged);
connect(encryptionButtonGroup, qOverload<QAbstractButton *>(&QButtonGroup::buttonClicked), this, &AccountWidget::slotPopEncryptionChanged);
connect(intervalCheck, &QCheckBox::toggled, this, &AccountWidget::slotEnablePopInterval);
populateDefaultAuthenticationOptions();
......
......@@ -275,7 +275,7 @@ void O1::link()
request.setRawHeader(O2_HTTP_AUTHORIZATION_HEADER, buildAuthorizationHeader(headers));
request.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String(O2_MIME_TYPE_XFORM));
QNetworkReply *reply = manager_->post(request, QByteArray());
connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::errorOccurred), this, &O1::onTokenRequestError);
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &O1::onTokenRequestError);
connect(reply, &QNetworkReply::finished, this, &O1::onTokenRequestFinished);
}
......@@ -362,7 +362,7 @@ void O1::exchangeToken()
request.setRawHeader(O2_HTTP_AUTHORIZATION_HEADER, buildAuthorizationHeader(oauthParams));
request.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String(O2_MIME_TYPE_XFORM));
QNetworkReply *reply = manager_->post(request, QByteArray());
connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::errorOccurred), this, &O1::onTokenExchangeError);
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &O1::onTokenExchangeError);
connect(reply, &QNetworkReply::finished, this, &O1::onTokenExchangeFinished);
}
......
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