Commit 6590f8d6 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent d43eb57d
...@@ -222,7 +222,7 @@ void CollectionPathResolver::doStart() ...@@ -222,7 +222,7 @@ void CollectionPathResolver::doStart()
} }
job = new CollectionFetchJob(d->mCurrentNode, CollectionFetchJob::Base, this); job = new CollectionFetchJob(d->mCurrentNode, CollectionFetchJob::Base, this);
} }
connect(job, SIGNAL(result(KJob*)), SLOT(jobResult(KJob*))); connect(job, &CollectionFetchJob::result, this, [this, d](KJob *job) { d->jobResult(job);});
} }
//@endcond //@endcond
......
...@@ -383,7 +383,7 @@ void CollectionFetchJob::slotResult(KJob *job) ...@@ -383,7 +383,7 @@ void CollectionFetchJob::slotResult(KJob *job)
} }
d_ptr->mCurrentSubJob = nullptr; d_ptr->mCurrentSubJob = nullptr;
removeSubjob(job); removeSubjob(job);
QTimer::singleShot(0, this, SLOT(startNext())); QTimer::singleShot(0, this, [this, d]() { d->startNext(); });
} else { } else {
Job::slotResult(job); Job::slotResult(job);
} }
......
...@@ -312,7 +312,7 @@ bool ItemModifyJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &res ...@@ -312,7 +312,7 @@ bool ItemModifyJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &res
ConflictHandler *handler = new ConflictHandler(ConflictHandler::LocalLocalConflict, this); ConflictHandler *handler = new ConflictHandler(ConflictHandler::LocalLocalConflict, this);
handler->setConflictingItems(d->mItems.first(), d->mItems.first()); handler->setConflictingItems(d->mItems.first(), d->mItems.first());
connect(handler, &ConflictHandler::conflictResolved, this, [this, d]() { d->conflictResolved(); }); connect(handler, &ConflictHandler::conflictResolved, this, [this, d]() { d->conflictResolved(); });
connect(handler, SIGNAL(error(QString)), SLOT(conflictResolveError(QString))); connect(handler, &ConflictHandler::error, this, [this, d](const QString &str) { d->conflictResolveError(str); });
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(handler, &ConflictHandler::start, Qt::QueuedConnection); QMetaObject::invokeMethod(handler, &ConflictHandler::start, Qt::QueuedConnection);
#else #else
......
...@@ -204,9 +204,6 @@ protected: ...@@ -204,9 +204,6 @@ protected:
private: private:
//@cond PRIVATE //@cond PRIVATE
Q_DECLARE_PRIVATE(ItemModifyJob) Q_DECLARE_PRIVATE(ItemModifyJob)
Q_PRIVATE_SLOT(d_func(), void conflictResolved())
Q_PRIVATE_SLOT(d_func(), void conflictResolveError(const QString &))
//@endcond //@endcond
}; };
......
...@@ -123,7 +123,7 @@ void RecursiveItemFetchJob::start() ...@@ -123,7 +123,7 @@ void RecursiveItemFetchJob::start()
job->fetchScope().setContentMimeTypes(d->mMimeTypes); job->fetchScope().setContentMimeTypes(d->mMimeTypes);
} }
connect(job, SIGNAL(result(KJob*)), this, SLOT(collectionFetchResult(KJob*))); connect(job, &CollectionFetchJob::result, this, [this](KJob *job) { d->collectionFetchResult(job); });
} }
Akonadi::Item::List RecursiveItemFetchJob::items() const Akonadi::Item::List RecursiveItemFetchJob::items() const
......
...@@ -145,7 +145,6 @@ private: ...@@ -145,7 +145,6 @@ private:
class Private; class Private;
Private *const d; Private *const d;
Q_PRIVATE_SLOT(d, void collectionFetchResult(KJob *))
Q_PRIVATE_SLOT(d, void itemFetchResult(KJob *)) Q_PRIVATE_SLOT(d, void itemFetchResult(KJob *))
//@endcond //@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