Commit 2bb5ea4f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QOverload

parent dd8dde26
......@@ -148,7 +148,7 @@ KPrefsWidInt::KPrefsWidInt(KConfigSkeleton::ItemInt *item, QWidget *parent)
if (!mItem->maxValue().isNull()) {
mSpin->setMaximum(mItem->maxValue().toInt());
}
connect(mSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KPrefsWidInt::changed);
connect(mSpin, QOverload<int>::of(&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, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KPrefsWidRadios::changed);
connect(mGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KPrefsWidRadios::changed);
}
KPrefsWidRadios::~KPrefsWidRadios()
......@@ -488,7 +488,7 @@ KPrefsWidCombo::KPrefsWidCombo(KConfigSkeleton::ItemEnum *item, QWidget *parent)
mLabel = new QLabel(mItem->label(), hbox);
mCombo = new KComboBox(hbox);
hboxHBoxLayout->addWidget(mCombo);
connect(mCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &KPrefsWidCombo::changed);
connect(mCombo, QOverload<int>::of(&KComboBox::activated), this, &KPrefsWidCombo::changed);
}
KPrefsWidCombo::~KPrefsWidCombo()
......
......@@ -57,8 +57,7 @@ PersonSearchJob::PersonSearchJob(const QString &searchString, QObject *parent)
: KJob(parent)
, d(new KPIM::PersonSearchJobPrivate(searchString))
{
connect(&d->mLdapSearch, static_cast<void (KLDAP::LdapClientSearch::*)(const KLDAP::LdapResultObject::List &)>(&KLDAP::LdapClientSearch::searchData),
this, &PersonSearchJob::onLDAPSearchData);
connect(&d->mLdapSearch, QOverload<const KLDAP::LdapResultObject::List &>::of(&KLDAP::LdapClientSearch::searchData), this, &PersonSearchJob::onLDAPSearchData);
connect(&d->mLdapSearch, &KLDAP::LdapClientSearch::searchDone, this, &PersonSearchJob::onLDAPSearchDone);
}
......
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