Commit 9555d7a9 authored by Laurent Montel's avatar Laurent Montel 😁

Use new connect api

parent 3924a340
......@@ -155,10 +155,8 @@ KDatePickerPopup::KDatePickerPopup(Modes modes, const QDate &date, QWidget *pare
d->mDatePicker = new KDatePicker(this);
d->mDatePicker->setCloseButton(false);
connect(d->mDatePicker, SIGNAL(dateEntered(QDate)),
SLOT(slotDateChanged(QDate)));
connect(d->mDatePicker, SIGNAL(dateSelected(QDate)),
SLOT(slotDateChanged(QDate)));
connect(d->mDatePicker, &KDatePicker::dateEntered, this, [this](const QDate &date) { d->slotDateChanged(date); });
connect(d->mDatePicker, &KDatePicker::dateSelected, this, [this](const QDate &date) { d->slotDateChanged(date); });
d->mDatePicker->setDate(date);
......
......@@ -105,7 +105,7 @@ public:
// save the new item in akonadi storage
Akonadi::ItemCreateJob *job = new Akonadi::ItemCreateJob(item, mCollection);
q->connect(job, SIGNAL(result(KJob*)), SLOT(slotAddContactDone(KJob*)));
q->connect(job, &Akonadi::ItemCreateJob::result, q, [this](KJob*job) { slotAddContactDone(job); });
} else {
q->setError(UserDefinedError);
q->emitResult();
......@@ -173,7 +173,7 @@ void AddContactJob::start()
searchJob->setQuery(Akonadi::ContactSearchJob::Email, d->mContact.preferredEmail().toLower(),
Akonadi::ContactSearchJob::ExactMatch);
connect(searchJob, SIGNAL(result(KJob*)), SLOT(slotSearchDone(KJob*)));
connect(searchJob, &Akonadi::ContactSearchJob::result, this, [this](KJob* job) { d->slotSearchDone(job);} );
}
#include "moc_addcontactjob.cpp"
......@@ -81,9 +81,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void slotSearchDone(KJob *))
Q_PRIVATE_SLOT(d, void slotAddContactDone(KJob *))
//@endcond
};
}
......
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