Commit 122441a9 authored by Laurent Montel's avatar Laurent Montel 😁

QMetaObject::invokeMethod can use lambda in qt5.10

parent a745dade
......@@ -71,7 +71,11 @@ void ConflictHandler::slotOtherItemFetched(KJob *job)
}
mConflictingItem = fetchJob->items().at(0);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &ConflictHandler::resolve, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "resolve", Qt::QueuedConnection);
#endif
}
void ConflictHandler::resolve()
......
......@@ -340,7 +340,11 @@ void SessionPrivate::forceReconnect()
if (connection) {
connection->forceReconnect();
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(mParent, &Session::reconnected, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(mParent, "reconnect", Qt::QueuedConnection);
#endif
}
Session::Session(const QByteArray &sessionId, QObject *parent)
......
......@@ -39,8 +39,14 @@ BridgeConnection::BridgeConnection(QTcpSocket *remoteSocket, QObject *parent)
, m_remoteSocket(remoteSocket)
{
// wait for the vtable to be complete
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &BridgeConnection::doConnects, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, &BridgeConnection::connectLocal, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "doConnects", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "connectLocal", Qt::QueuedConnection);
#endif
}
BridgeConnection::~BridgeConnection()
......
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