QmlDesigner: Fix remaining C++20 warnings about [=] captures

Change-Id: Ia54208e5e72016f6ca22e0b005d479aac8f49929
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2024-02-06 14:01:07 +01:00
parent 48bdf883dd
commit ff1aa20892
19 changed files with 66 additions and 54 deletions

View File

@@ -125,7 +125,8 @@ bool ContentLibraryMaterialsModel::fetchBundleIcons(const QDir &bundleDir)
downloader->setProbeUrl(false);
downloader->setDownloadEnabled(true);
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
[this, downloader, bundleDir] {
FileExtractor *extractor = new FileExtractor(this);
extractor->setArchiveName(downloader->completeBaseName());
extractor->setSourceFile(downloader->outputFile());
@@ -133,7 +134,8 @@ bool ContentLibraryMaterialsModel::fetchBundleIcons(const QDir &bundleDir)
extractor->setAlwaysCreateDir(false);
extractor->setClearTargetPathContents(false);
QObject::connect(extractor, &FileExtractor::finishedChanged, this, [=]() {
QObject::connect(extractor, &FileExtractor::finishedChanged, this,
[this, downloader, bundleDir, extractor] {
downloader->deleteLater();
extractor->deleteLater();
@@ -162,10 +164,10 @@ bool ContentLibraryMaterialsModel::fetchBundleMetadata(const QDir &bundleDir)
downloader->setDownloadEnabled(true);
downloader->setTargetFilePath(matBundlePath);
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
[this, downloader, bundleDir] {
if (fetchBundleIcons(bundleDir))
loadMaterialBundle(bundleDir);
downloader->deleteLater();
});
@@ -181,7 +183,8 @@ void ContentLibraryMaterialsModel::downloadSharedFiles(const QDir &targetDir, co
downloader->setProbeUrl(false);
downloader->setDownloadEnabled(true);
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
[this, downloader, targetDir] {
FileExtractor *extractor = new FileExtractor(this);
extractor->setArchiveName(downloader->completeBaseName());
extractor->setSourceFile(downloader->outputFile());