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

Use qOverload directly

parent e020ab88
......@@ -70,7 +70,7 @@ else()
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
add_definitions(-DQT_NO_FOREACH)
set(CMAKE_CXX_STANDARD 14)
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")
......
......@@ -52,7 +52,7 @@ KCMLdap::KCMLdap(QWidget *parent, const QVariantList &)
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget);
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, QOverload<bool>::of(&KCMLdap::changed));
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, qOverload<bool>(&KCMLdap::changed));
}
KCMLdap::~KCMLdap()
......
......@@ -195,7 +195,7 @@ void LdapClientSearch::Private::readConfig()
q, [this]() {
slotLDAPDone();
});
q->connect(ldapClient, QOverload<const QString &>::of(&LdapClient::error),
q->connect(ldapClient, qOverload<const QString &>(&LdapClient::error),
q, [this](const QString &str) {
slotLDAPError(str);
});
......
......@@ -580,7 +580,7 @@ LdapSearchDialog::LdapSearchDialog(QWidget *parent)
d->mResultView->verticalHeader()->hide();
d->mResultView->setSortingEnabled(true);
d->mResultView->horizontalHeader()->setSortIndicatorShown(true);
connect(d->mResultView, QOverload<const QModelIndex &>::of(&QTableView::clicked), this, [this]() {
connect(d->mResultView, qOverload<const QModelIndex &>(&QTableView::clicked), this, [this]() {
d->slotSelectionChanged();
});
topLayout->addWidget(d->mResultView);
......
......@@ -148,7 +148,7 @@ KPrefsWidInt::KPrefsWidInt(KConfigSkeleton::ItemInt *item, QWidget *parent)
if (!mItem->maxValue().isNull()) {
mSpin->setMaximum(mItem->maxValue().toInt());
}
connect(mSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &KPrefsWidInt::changed);
connect(mSpin, qOverload<int>(&QSpinBox::valueChanged), this, &KPrefsWidInt::changed);
mLabel->setBuddy(mSpin);
QString toolTip = mItem->toolTip();
if (!toolTip.isEmpty()) {
......@@ -434,7 +434,7 @@ KPrefsWidRadios::KPrefsWidRadios(KConfigSkeleton::ItemEnum *item, QWidget *paren
mBox = new QGroupBox(mItem->label(), parent);
new QVBoxLayout(mBox);
mGroup = new QButtonGroup(parent);
connect(mGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KPrefsWidRadios::changed);
connect(mGroup, qOverload<int>(&QButtonGroup::buttonClicked), this, &KPrefsWidRadios::changed);
}
KPrefsWidRadios::~KPrefsWidRadios()
......@@ -484,7 +484,7 @@ KPrefsWidCombo::KPrefsWidCombo(KConfigSkeleton::ItemEnum *item, QWidget *parent)
{
mLabel = new QLabel(mItem->label(), parent);
mCombo = new KComboBox(parent);
connect(mCombo, QOverload<int>::of(&KComboBox::activated), this, &KPrefsWidCombo::changed);
connect(mCombo, qOverload<int>(&KComboBox::activated), this, &KPrefsWidCombo::changed);
mLabel->setBuddy(mCombo);
QString toolTip = mItem->toolTip();
if (!toolTip.isEmpty()) {
......
......@@ -138,7 +138,7 @@ KCheckComboBox::KCheckComboBox(QWidget *parent)
: KComboBox(parent)
, d(new KCheckComboBox::Private(this))
{
connect(this, QOverload<int>::of(&KComboBox::activated), this, [this]() {
connect(this, qOverload<int>(&KComboBox::activated), this, [this]() {
d->toggleCheckState();
});
connect(model(), &QAbstractItemModel::rowsInserted, this,
......
......@@ -138,12 +138,12 @@ void AddresseeLineEditPrivate::init()
this, &AddresseeLineEditPrivate::slotReturnPressed);
KCompletionBox *box = q->completionBox();
connect(box, QOverload<const QString &>::of(&KCompletionBox::activated),
connect(box, qOverload<const QString &>(&KCompletionBox::activated),
this, &AddresseeLineEditPrivate::slotPopupCompletion);
connect(box, &KCompletionBox::userCancelled,
this, &AddresseeLineEditPrivate::slotUserCancelled);
connect(AddresseeLineEditManager::self()->ldapTimer(), &QTimer::timeout, this, &AddresseeLineEditPrivate::slotStartLDAPLookup);
connect(AddresseeLineEditManager::self()->ldapSearch(), QOverload<const KLDAP::LdapResult::List &>::of(&KLDAP::LdapClientSearch::searchData),
connect(AddresseeLineEditManager::self()->ldapSearch(), qOverload<const KLDAP::LdapResult::List &>(&KLDAP::LdapClientSearch::searchData),
this, &AddresseeLineEditPrivate::slotLDAPSearchData);
mCompletionInitialized = true;
......
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