aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsplugindumper.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-11-11 16:34:39 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-11-16 13:45:02 +0000
commit6d5e30215762255abb76faa2d81a1a8ff60b8960 (patch)
tree3d62b027bf5a94b55b79eaa796b233b50f8a3e17 /src/libs/qmljs/qmljsplugindumper.cpp
parent3167d23a36ff5b9fd42105f763b9e19bf62596cb (diff)
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>
Diffstat (limited to 'src/libs/qmljs/qmljsplugindumper.cpp')
-rw-r--r--src/libs/qmljs/qmljsplugindumper.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libs/qmljs/qmljsplugindumper.cpp b/src/libs/qmljs/qmljsplugindumper.cpp
index 8b7604809b..a1c084a59a 100644
--- a/src/libs/qmljs/qmljsplugindumper.cpp
+++ b/src/libs/qmljs/qmljsplugindumper.cpp
@@ -65,24 +65,20 @@ Utils::FileSystemWatcher *PluginDumper::pluginWatcher()
void PluginDumper::loadBuiltinTypes(const QmlJS::ModelManagerInterface::ProjectInfo &info)
{
// move to the owning thread
- metaObject()->invokeMethod(this, "onLoadBuiltinTypes",
- Q_ARG(QmlJS::ModelManagerInterface::ProjectInfo, info));
+ metaObject()->invokeMethod(this, [=] { onLoadBuiltinTypes(info); });
}
void PluginDumper::loadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri, const QString &importVersion)
{
// move to the owning thread
- metaObject()->invokeMethod(this, "onLoadPluginTypes",
- Q_ARG(QString, libraryPath),
- Q_ARG(QString, importPath),
- Q_ARG(QString, importUri),
- Q_ARG(QString, importVersion));
+ metaObject()->invokeMethod(this, [=] { onLoadPluginTypes(libraryPath, importPath,
+ importUri, importVersion); });
}
void PluginDumper::scheduleRedumpPlugins()
{
// move to the owning thread
- metaObject()->invokeMethod(this, "dumpAllPlugins", Qt::QueuedConnection);
+ metaObject()->invokeMethod(this, &PluginDumper::dumpAllPlugins, Qt::QueuedConnection);
}
void PluginDumper::onLoadBuiltinTypes(const QmlJS::ModelManagerInterface::ProjectInfo &info, bool force)