forked from qt-creator/qt-creator
Use typed syntax in calls to QMetaObject::invokeMethod
We do it wherever possible. Some places can't be fixed since they still rely on dynamic introspection (mainly QQuickItem cases). Change-Id: Ia00b4a04d8b995c9a43b7bf2dbe76a60364bb8ca Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -107,11 +107,11 @@ public:
|
||||
|| connection->connectionParameters() != sshParams)
|
||||
continue;
|
||||
|
||||
if (connection->thread() != QThread::currentThread()) {
|
||||
QMetaObject::invokeMethod(this, "switchToCallerThread",
|
||||
Qt::BlockingQueuedConnection,
|
||||
Q_ARG(SshConnection *, connection),
|
||||
Q_ARG(QObject *, QThread::currentThread()));
|
||||
auto currentThread = QThread::currentThread();
|
||||
if (connection->thread() != currentThread) {
|
||||
QMetaObject::invokeMethod(this, [this, connection, currentThread] {
|
||||
switchToCallerThread(connection, currentThread);
|
||||
}, Qt::BlockingQueuedConnection);
|
||||
}
|
||||
|
||||
m_unacquiredConnections.removeOne(c);
|
||||
|
||||
Reference in New Issue
Block a user