diff options
author | hjk <hjk@qt.io> | 2023-12-18 16:26:23 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2024-01-17 15:18:41 +0000 |
commit | f5d4d331c402519877279b753f705014c11824c5 (patch) | |
tree | 4d4109ca814ee10a47f4af78e83dd60d0cd1da7d /src/libs/qmljs/qmljsplugindumper.cpp | |
parent | 164a6e7447bd94a3dbe89dd90d005964db61e29d (diff) |
Make some more capturelists friendlier for C++20
Change-Id: Ic00f75e1f59f5eb0430d24e4448a3bb7f8bfbd8d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/libs/qmljs/qmljsplugindumper.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsplugindumper.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libs/qmljs/qmljsplugindumper.cpp b/src/libs/qmljs/qmljsplugindumper.cpp index 04913de3dd..d2407bb113 100644 --- a/src/libs/qmljs/qmljsplugindumper.cpp +++ b/src/libs/qmljs/qmljsplugindumper.cpp @@ -46,7 +46,7 @@ Utils::FileSystemWatcher *PluginDumper::pluginWatcher() void PluginDumper::loadBuiltinTypes(const QmlJS::ModelManagerInterface::ProjectInfo &info) { // move to the owning thread - metaObject()->invokeMethod(this, [=] { onLoadBuiltinTypes(info); }); + metaObject()->invokeMethod(this, [this, info] { onLoadBuiltinTypes(info); }); } void PluginDumper::loadPluginTypes(const Utils::FilePath &libraryPath, @@ -55,8 +55,9 @@ void PluginDumper::loadPluginTypes(const Utils::FilePath &libraryPath, const QString &importVersion) { // move to the owning thread - metaObject()->invokeMethod(this, [=] { onLoadPluginTypes(libraryPath, importPath, - importUri, importVersion); }); + metaObject()->invokeMethod(this, [this, libraryPath, importPath, importUri, importVersion] { + onLoadPluginTypes(libraryPath, importPath, importUri, importVersion); + }); } void PluginDumper::scheduleRedumpPlugins() @@ -424,7 +425,8 @@ QFuture<PluginDumper::DependencyInfo> PluginDumper::loadDependencies(const FileP visited->insert(name); } - Utils::onFinished(loadQmlTypeDescription(dependenciesPaths), const_cast<PluginDumper*>(this), [=] (const QFuture<PluginDumper::QmlTypeDescription> &typesFuture) { + Utils::onFinished(loadQmlTypeDescription(dependenciesPaths), const_cast<PluginDumper*>(this), + [this, iface, visited](const QFuture<PluginDumper::QmlTypeDescription> &typesFuture) { PluginDumper::QmlTypeDescription typesResult = typesFuture.result(); FilePaths newDependencies = FileUtils::toFilePathList(typesResult.dependencies); @@ -560,8 +562,9 @@ void PluginDumper::loadQmltypesFile(const FilePaths &qmltypesFilePaths, const FilePath &libraryPath, QmlJS::LibraryInfo libraryInfo) { - Utils::onFinished(loadQmlTypeDescription(qmltypesFilePaths), this, [=](const QFuture<PluginDumper::QmlTypeDescription> &typesFuture) - { + Utils::onFinished(loadQmlTypeDescription(qmltypesFilePaths), this, + [this, qmltypesFilePaths, libraryPath, libraryInfo] + (const QFuture<PluginDumper::QmlTypeDescription> &typesFuture) { PluginDumper::QmlTypeDescription typesResult = typesFuture.result(); if (!typesResult.dependencies.isEmpty()) { |