aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2017-12-29 08:09:30 +0100
committerLaurent Montel <[email protected]>2017-12-29 08:09:54 +0100
commit122441a9456d92872159ec10dc99c566e26d2822 (patch)
tree3c5314cd4fe8ec0c07e0bc3f596fb5951313b94e
parenta745dadefa0ab7ec07924aa08fc570f5116ff68b (diff)
QMetaObject::invokeMethod can use lambda in qt5.10
-rw-r--r--src/core/conflicthandler.cpp4
-rw-r--r--src/core/session.cpp4
-rw-r--r--src/rds/bridgeconnection.cpp6
3 files changed, 14 insertions, 0 deletions
diff --git a/src/core/conflicthandler.cpp b/src/core/conflicthandler.cpp
index 6e89172..8fa5bdd 100644
--- a/src/core/conflicthandler.cpp
+++ b/src/core/conflicthandler.cpp
@@ -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()
diff --git a/src/core/session.cpp b/src/core/session.cpp
index adb6d6f..9eeadac 100644
--- a/src/core/session.cpp
+++ b/src/core/session.cpp
@@ -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)
diff --git a/src/rds/bridgeconnection.cpp b/src/rds/bridgeconnection.cpp
index 9a9ac89..4182e7a 100644
--- a/src/rds/bridgeconnection.cpp
+++ b/src/rds/bridgeconnection.cpp
@@ -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()