Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6be470ca authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent d25d09dd
......@@ -37,7 +37,11 @@ FakeItemRetrievalManager::~FakeItemRetrievalManager()
void FakeItemRetrievalManager::requestItemDelivery(ItemRetrievalRequest *request)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, request] { Q_EMIT requestFinished(request); }, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "requestFinished", Qt::QueuedConnection,
Q_ARG(ItemRetrievalRequest*, request));
#endif
}
......@@ -1045,13 +1045,21 @@ void ResourceBasePrivate::slotAttributeRetrievalCollectionFetchDone(KJob *job)
void ResourceBasePrivate::slotSynchronizeTags()
{
Q_Q(ResourceBase);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, q] { q->retrieveTags(); });
#else
QMetaObject::invokeMethod(q, "retrieveTags");
#endif
}
void ResourceBasePrivate::slotSynchronizeRelations()
{
Q_Q(ResourceBase);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, q] { q->retrieveRelations(); });
#else
QMetaObject::invokeMethod(q, "retrieveRelations");
#endif
}
void ResourceBasePrivate::slotPrepareItemRetrieval(const Item &item)
......
......@@ -52,14 +52,16 @@ AkThread::~AkThread()
void AkThread::startThread()
{
const bool init = QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);
Q_ASSERT(init); Q_UNUSED(init);
Q_ASSERT(init);
Q_UNUSED(init);
}
void AkThread::quitThread()
{
qCDebug(AKONADISERVER_LOG) << "Shutting down" << objectName() << "...";
const bool invoke = QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection);
Q_ASSERT(invoke); Q_UNUSED(invoke);
Q_ASSERT(invoke);
Q_UNUSED(invoke);
if (!thread()->wait(10 * 1000)) {
thread()->terminate();
thread()->wait();
......
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