Commit b94a5fc8 authored by Laurent Montel's avatar Laurent Montel 😁

Prot to new connect api

parent 72ad8daa
......@@ -181,7 +181,7 @@ void JobPrivate::startQueued()
emit q->aboutToStart(q);
q->doStart();
QTimer::singleShot(0, q, SLOT(startNext()));
QTimer::singleShot(0, q, [this]() { startNext(); });
QMetaObject::invokeMethod(q, "signalStartedToJobTracker", Qt::QueuedConnection);
}
......@@ -348,7 +348,7 @@ bool Job::addSubjob(KJob *job)
bool rv = KCompositeJob::addSubjob(job);
if (rv) {
connect(job, SIGNAL(aboutToStart(Akonadi::Job*)), SLOT(slotSubJobAboutToStart(Akonadi::Job*)));
QTimer::singleShot(0, this, SLOT(startNext()));
QTimer::singleShot(0, this, [this]() { d_ptr->startNext(); });
}
return rv;
}
......@@ -358,7 +358,7 @@ bool Job::removeSubjob(KJob *job)
bool rv = KCompositeJob::removeSubjob(job);
if (job == d_ptr->mCurrentSubJob) {
d_ptr->mCurrentSubJob = nullptr;
QTimer::singleShot(0, this, SLOT(startNext()));
QTimer::singleShot(0, this, [this]() { d_ptr->startNext(); });
}
return rv;
}
......@@ -379,7 +379,7 @@ void Job::slotResult(KJob *job)
d_ptr->mCurrentSubJob = nullptr;
KCompositeJob::slotResult(job);
if (!job->error()) {
QTimer::singleShot(0, this, SLOT(startNext()));
QTimer::singleShot(0, this, [this]() { d_ptr->startNext(); });
}
} else {
// job that was still waiting for execution finished, probably canceled,
......
......@@ -296,7 +296,7 @@ void CollectionModelPrivate::init()
session = new Session(QCoreApplication::instance()->applicationName().toUtf8()
+ QByteArray("-CollectionModel-") + QByteArray::number(qrand()), q);
QTimer::singleShot(0, q, SLOT(startFirstListJob()));
QTimer::singleShot(0, q, [this] { startFirstListJob(); });
// monitor collection changes
monitor = new Monitor();
......
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