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:
@@ -180,8 +180,8 @@ QList<LocatorFilterEntry> HelpIndexFilter::matchesFor(QFutureInterface<LocatorFi
|
||||
|
||||
if (forceUpdate) {
|
||||
QStringList indices;
|
||||
QMetaObject::invokeMethod(this, "allIndices", Qt::BlockingQueuedConnection,
|
||||
Q_RETURN_ARG(QStringList, indices));
|
||||
QMetaObject::invokeMethod(this, [this] { return allIndices(); },
|
||||
Qt::BlockingQueuedConnection, &indices);
|
||||
m_mutex.lock(); // guard m_needsUpdate
|
||||
m_needsUpdate = false;
|
||||
m_mutex.unlock();
|
||||
|
||||
@@ -155,7 +155,7 @@ void SearchWidget::showEvent(QShowEvent *event)
|
||||
connect(searchEngine, &QHelpSearchEngine::indexingFinished, this,
|
||||
&SearchWidget::indexingFinished);
|
||||
|
||||
QMetaObject::invokeMethod(&LocalHelpManager::helpEngine(), "setupFinished",
|
||||
QMetaObject::invokeMethod(&LocalHelpManager::helpEngine(), &QHelpEngine::setupFinished,
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user