Commit 95f50756 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 81565f17
......@@ -136,7 +136,7 @@ void ItemSyncPrivate::createOrMerge(const Item &item)
merge |= ItemCreateJob::RID;
}
create->setMerge(merge);
q->connect(create, SIGNAL(result(KJob*)), q, SLOT(slotLocalChangeDone(KJob*)));
q->connect(create, &ItemCreateJob::result, q, [this](KJob *job) {slotLocalChangeDone(job);});
}
bool ItemSyncPrivate::allProcessed() const
......@@ -296,7 +296,7 @@ void ItemSyncPrivate::fetchLocalItemsToDelete()
job->fetchScope().setCacheOnly(true);
QObject::connect(job, SIGNAL(itemsReceived(Akonadi::Item::List)), q, SLOT(slotItemsReceived(Akonadi::Item::List)));
QObject::connect(job, SIGNAL(result(KJob*)), q, SLOT(slotLocalListDone(KJob*)));
QObject::connect(job, &ItemFetchJob::result, q, [this](KJob *job) { slotLocalListDone(job); });
mPendingJobs++;
}
......@@ -416,7 +416,7 @@ void ItemSyncPrivate::deleteItems(const Item::List &itemsToDelete)
mPendingJobs++;
ItemDeleteJob *job = new ItemDeleteJob(itemsToDelete, subjobParent());
q->connect(job, SIGNAL(result(KJob*)), q, SLOT(slotLocalDeleteDone(KJob*)));
q->connect(job, &ItemDeleteJob::result, q, [this](KJob *job) { slotLocalDeleteDone(job); });
// It can happen that the groupware servers report us deleted items
// twice, in this case this item delete job will fail on the second try.
......
......@@ -261,8 +261,6 @@ private:
Q_DECLARE_PRIVATE(ItemSync)
Q_PRIVATE_SLOT(d_func(), void slotLocalListDone(KJob *))
Q_PRIVATE_SLOT(d_func(), void slotLocalDeleteDone(KJob *))
Q_PRIVATE_SLOT(d_func(), void slotLocalChangeDone(KJob *))
Q_PRIVATE_SLOT(d_func(), void slotTransactionResult(KJob *))
Q_PRIVATE_SLOT(d_func(), void slotItemsReceived(const Akonadi::Item::List &))
//@endcond
......
......@@ -184,7 +184,7 @@ void AgentInstanceCreateJobPrivate::doStart()
if (!agentType.isValid()) {
q->setError(KJob::UserDefinedError);
q->setErrorText(i18n("Unable to obtain agent type '%1'.", agentTypeId));
QTimer::singleShot(0, q, SLOT(emitResult()));
QTimer::singleShot(0, q, [this]() { emitResult(); });
return;
}
......@@ -192,7 +192,7 @@ void AgentInstanceCreateJobPrivate::doStart()
if (!agentInstance.isValid()) {
q->setError(KJob::UserDefinedError);
q->setErrorText(i18n("Unable to create agent instance."));
QTimer::singleShot(0, q, SLOT(emitResult()));
QTimer::singleShot(0, q, [this]() { emitResult(); });
} else {
int timeout = safetyTimeout;
#ifdef Q_OS_UNIX
......
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