forked from qt-creator/qt-creator
Make some more capturelists friendlier for C++20
Change-Id: Ic00f75e1f59f5eb0430d24e4448a3bb7f8bfbd8d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -174,7 +174,7 @@ void DefinitionDownloader::start()
|
||||
auto req = QNetworkRequest(QUrl(url));
|
||||
req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
|
||||
auto reply = d->nam->get(req);
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, [=]() {
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() {
|
||||
d->definitionListDownloadFinished(reply);
|
||||
});
|
||||
}
|
||||
|
@@ -1420,7 +1420,7 @@ void ModelManagerInterface::maybeQueueCppQmlTypeUpdate(const CPlusPlus::Document
|
||||
|
||||
QMutexLocker locker(&g_instanceMutex);
|
||||
if (g_instance) // delegate actual queuing to the gui thread
|
||||
QMetaObject::invokeMethod(g_instance, [=] { queueCppQmlTypeUpdate(doc, scan); });
|
||||
QMetaObject::invokeMethod(g_instance, [this, doc, scan] { queueCppQmlTypeUpdate(doc, scan); });
|
||||
}
|
||||
|
||||
void ModelManagerInterface::queueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc, bool scan)
|
||||
|
@@ -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())
|
||||
{
|
||||
|
Reference in New Issue
Block a user