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 a00acc45 authored by Laurent Montel's avatar Laurent Montel 😁

Remove QT_CHECK

parent 309ee245
......@@ -174,21 +174,13 @@ void Session::processResponse(const KManageSieve::Response &response, const QByt
if (m_currentJob) {
if (m_currentJob->d->handleResponse(response, data)) {
m_currentJob = nullptr;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &Session::executeNextJob, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "executeNextJob", Qt::QueuedConnection);
#endif
}
break;
} else {
// we can get here in the kill current job case
if (response.operationResult() != Response::Other) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &Session::executeNextJob, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "executeNextJob", Qt::QueuedConnection);
#endif
return;
}
}
......@@ -200,11 +192,7 @@ void Session::scheduleJob(SieveJob *job)
{
qCDebug(KMANAGERSIEVE_LOG) << objectName() << Q_FUNC_INFO << job;
m_jobs.enqueue(job);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &Session::executeNextJob, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "executeNextJob", Qt::QueuedConnection);
#endif
}
void Session::killJob(SieveJob *job, KJob::KillVerbosity verbosity)
......@@ -317,11 +305,7 @@ void Session::authenticationDone()
m_state = None;
m_connected = true;
qCDebug(KMANAGERSIEVE_LOG) << objectName() << "authentication done, ready to execute jobs";
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &Session::executeNextJob, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "executeNextJob", Qt::QueuedConnection);
#endif
}
void Session::sslError(const KSslErrorUiData &data)
......
......@@ -69,11 +69,7 @@ SessionThread::SessionThread(Session *session, QObject *parent)
SessionThread::~SessionThread()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &SessionThread::doDestroy, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doDestroy", Qt::QueuedConnection);
#endif
if (!thread()->wait(10 * 1000)) {
thread()->terminate();
thread()->wait();
......@@ -109,15 +105,9 @@ void SessionThread::doDestroy()
// Called in main thread
void SessionThread::connectToHost(const QUrl &url)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, url]() {
doConnectToHost(url);
}, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doConnectToHost",
Qt::QueuedConnection,
Q_ARG(QUrl, url));
#endif
}
// Called in secondary thread
......@@ -136,15 +126,9 @@ void SessionThread::doConnectToHost(const QUrl &url)
// Called in main thread
void SessionThread::disconnectFromHost(bool sendLogout)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, sendLogout]() {
doDisconnectFromHost(sendLogout);
}, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doDisconnectFromHost",
Qt::QueuedConnection,
Q_ARG(bool, sendLogout));
#endif
}
// Called in secondary thread
......@@ -161,15 +145,9 @@ void SessionThread::doDisconnectFromHost(bool sendLogout)
// Called in main thread
void SessionThread::sendData(const QByteArray &data)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, [this, data]() {
doSendData(data);
}, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doSendData",
Qt::QueuedConnection,
Q_ARG(QByteArray, data));
#endif
}
// Called in secondary thread
......@@ -241,11 +219,7 @@ void SessionThread::slotSocketError()
// Called in main thread
void SessionThread::startAuthentication()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &SessionThread::doStartAuthentication, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doStartAuthentication", Qt::QueuedConnection);
#endif
}
// Called in secondary thread
......@@ -431,11 +405,7 @@ bool SessionThread::saslClientStep(const QByteArray &challenge)
// Called in main thread
void SessionThread::startSsl()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &SessionThread::doStartSsl, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doStartSsl", Qt::QueuedConnection);
#endif
}
// Called in secondary thread
......
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