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

Use new method which can take lambda

parent 6b0c41cb
......@@ -137,7 +137,11 @@ EwsResource::EwsResource(const QString &id)
mTagStore = new EwsTagStore(this);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &EwsResource::delayedInit, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "delayedInit", Qt::QueuedConnection);
#endif
connect(this, &AgentBase::reloadConfiguration, this, &EwsResource::reloadConfig);
......
......@@ -30,7 +30,11 @@ GoogleAccountManager::GoogleAccountManager(QObject *parent)
: QObject(parent)
, m_isReady(false)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &GoogleAccountManager::initManager, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "initManager", Qt::QueuedConnection);
#endif
}
GoogleAccountManager::~GoogleAccountManager()
......
......@@ -103,8 +103,11 @@ GoogleSettingsDialog::GoogleSettingsDialog(GoogleAccountManager *accountManager,
if (m_enableRefresh->isEnabled()) {
m_refreshSpinBox->setValue(Settings::self()->intervalCheckTime());
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &GoogleSettingsDialog::reloadAccounts, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "reloadAccounts", Qt::QueuedConnection);
#endif
}
GoogleSettingsDialog::~GoogleSettingsDialog()
......
......@@ -152,7 +152,11 @@ void ImapIdleManager::onConnectionLost(KIMAP::Session *session)
// the pointer, we don't need to release it once the
// task is done
m_session = nullptr;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &ImapIdleManager::reconnect, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "reconnect", Qt::QueuedConnection);
#endif
}
}
......
......@@ -147,7 +147,11 @@ ImapResourceBase::ImapResourceBase(const QString &id)
connect(m_statusMessageTimer, &QTimer::timeout, this, &ImapResourceBase::clearStatusMessage);
connect(this, &AgentBase::error, this, &ImapResourceBase::showError);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &ImapResourceBase::delayedInit, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "delayedInit", Qt::QueuedConnection);
#endif
}
void ImapResourceBase::delayedInit()
......
......@@ -77,7 +77,11 @@ void RetrieveItemsJob::localListDone(KJob *job)
m_entryIterator = new QDirIterator(m_maildir.pathToNew(), QDir::Files);
m_previousMtime = m_collection.remoteRevision().toLongLong();
m_highestMtime = 0;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &RetrieveItemsJob::processEntry, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "processEntry", Qt::QueuedConnection);
#endif
}
void RetrieveItemsJob::processEntry()
......@@ -137,7 +141,11 @@ void RetrieveItemsJob::processEntry()
}
if (trx != lastTrx) {
lastTrx = trx;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &RetrieveItemsJob::processEntry, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "processEntry", Qt::QueuedConnection);
#endif
return;
}
}
......
......@@ -180,8 +180,11 @@ void CompactChangeHelper::addChangedItems(const Item::List &items)
if (updateBatch.collection.isValid()) {
d->mPendingUpdates << updateBatch;
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this]() { d->processNextBatch(); }, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "processNextBatch", Qt::QueuedConnection);
#endif
}
QString CompactChangeHelper::currentRemoteId(const Item &item) const
......
......@@ -778,7 +778,11 @@ void MixedMaildirResource::restoreTags(const QVariant &arg)
const TagContextList taggedItems = mTagContextByColId[ collection.id() ];
mPendingTagContexts << taggedItems;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &MixedMaildirResource::processNextTagContext, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "processNextTagContext", Qt::QueuedConnection);
#endif
taskDone();
}
......
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