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