diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-02-06 14:01:07 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-02-07 11:20:13 +0000 |
commit | ff1aa208921b3bbece2831b253fa0d1fee855243 (patch) | |
tree | 46f25188fd6c85460b6400bfcccbff2d43508d6b | |
parent | 48bdf883dddcf131416f2f215c8c8e9dc2caf092 (diff) |
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>
19 files changed, 66 insertions, 54 deletions
diff --git a/src/plugins/effectcomposer/effectcomposermodel.cpp b/src/plugins/effectcomposer/effectcomposermodel.cpp index 1edc70c75b..3f376d0633 100644 --- a/src/plugins/effectcomposer/effectcomposermodel.cpp +++ b/src/plugins/effectcomposer/effectcomposermodel.cpp @@ -1462,8 +1462,9 @@ void EffectComposerModel::bakeShaders() args << "-o" << outPaths[i] << srcPaths[i]; auto qsbProcess = new Utils::Process(this); - connect(qsbProcess, &Utils::Process::done, this, [=] { - handleQsbProcessExit(qsbProcess, srcPaths[i], preview); + connect(qsbProcess, &Utils::Process::done, this, + [this, qsbProcess, path = srcPaths[i], preview] { + handleQsbProcessExit(qsbProcess, path, preview); }); qsbProcess->setWorkingDirectory(workDir.absolutePath()); qsbProcess->setCommand({qsbPath, args}); diff --git a/src/plugins/qmldesigner/components/annotationeditor/annotationtableview.cpp b/src/plugins/qmldesigner/components/annotationeditor/annotationtableview.cpp index f3cc629dd8..3c4b780c74 100644 --- a/src/plugins/qmldesigner/components/annotationeditor/annotationtableview.cpp +++ b/src/plugins/qmldesigner/components/annotationeditor/annotationtableview.cpp @@ -245,7 +245,7 @@ void RichTextCellEditor::setupSignal(int index, const QString &commentTitle) if (m_connection) disconnect(m_connection); - m_connection = connect(this, &RichTextCellEditor::clicked, this, [=]() { + m_connection = connect(this, &RichTextCellEditor::clicked, this, [this, index, commentTitle] { emit richTextClicked(index, commentTitle); }); } @@ -278,7 +278,7 @@ AnnotationTableView::AnnotationTableView(QWidget *parent) if (item->isCheckable()) m_model->setData(item->index(), item->checkState() == Qt::Checked); - if (this->m_modelUpdating) + if (m_modelUpdating) return; auto *valueItem = m_model->item(item->row(), ColumnId::Value); diff --git a/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp b/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp index fa175123c7..a4538b56c3 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp @@ -223,7 +223,9 @@ void SignalList::addConnection(const QModelIndex &modelIndex) if (rootModelNode.isValid() && rootModelNode.metaInfo().isValid()) { NodeMetaInfo nodeMetaInfo = view->model()->qtQuickConnectionsMetaInfo(); if (nodeMetaInfo.isValid()) { - view->executeInTransaction("ConnectionModel::addConnection", [=, &rootModelNode](){ + view->executeInTransaction("ConnectionModel::addConnection", + [this, view, nodeMetaInfo, targetModelIndex, modelIndex, + buttonModelIndex, signalName, &rootModelNode] { ModelNode newNode = view->createModelNode("QtQuick.Connections", nodeMetaInfo.majorVersion(), nodeMetaInfo.minorVersion()); @@ -263,7 +265,8 @@ void SignalList::removeConnection(const QModelIndex &modelIndex) ModelNode node = targetSignal.parentModelNode(); if (node.isValid()) { - view->executeInTransaction("ConnectionModel::removeConnection", [=, &node](){ + view->executeInTransaction("ConnectionModel::removeConnection", + [this, modelIndex, buttonModelIndex, targetSignal, &node] { QList<SignalHandlerProperty> allSignals = node.signalProperties(); if (allSignals.size() > 1) { const auto targetSignalWithPrefix = SignalHandlerProperty::prefixAdded(targetSignal.name()); diff --git a/src/plugins/qmldesigner/components/collectioneditor/collectionview.cpp b/src/plugins/qmldesigner/components/collectioneditor/collectionview.cpp index 1b1d1a7d9f..9a9084d8f0 100644 --- a/src/plugins/qmldesigner/components/collectioneditor/collectionview.cpp +++ b/src/plugins/qmldesigner/components/collectioneditor/collectionview.cpp @@ -46,13 +46,11 @@ CollectionView::CollectionView(ExternalDependenciesInterface &externalDependenci { connect(ProjectExplorer::ProjectManager::instance(), - &ProjectExplorer::ProjectManager::startupProjectChanged, - this, - [=] { - resetDataStoreNode(); - if (m_widget.get()) - m_widget->collectionDetailsModel()->removeAllCollections(); - }); + &ProjectExplorer::ProjectManager::startupProjectChanged, this, [this] { + resetDataStoreNode(); + if (m_widget.get()) + m_widget->collectionDetailsModel()->removeAllCollections(); + }); resetDataStoreNode(); } diff --git a/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.cpp b/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.cpp index 9c6ef49a05..a323654b6b 100644 --- a/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.cpp +++ b/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.cpp @@ -465,7 +465,7 @@ void LayoutInGridLayout::removeSpacersBySpanning(QList<ModelNode> &nodes) LayoutInGridLayout::LessThan LayoutInGridLayout::lessThan() { - return [=](const ModelNode &node1, const ModelNode &node2)->bool { + return [this](const ModelNode &node1, const ModelNode &node2) { QmlItemNode itemNode1 = QmlItemNode(node1); QmlItemNode itemNode2 = QmlItemNode(node2); if (itemNode1.isValid() && itemNode2.isValid()) { diff --git a/src/plugins/qmldesigner/components/connectioneditor/backendmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/backendmodel.cpp index 93c151978f..a5e41e8f23 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/backendmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/backendmodel.cpp @@ -227,7 +227,8 @@ void BackendModel::addNewBackend() /* Add a property for non singleton types. For singletons just adding the import is enough. */ if (!dialog.isSingleton()) { - m_connectionView->executeInTransaction("BackendModel::addNewBackend", [=, &dialog](){ + m_connectionView->executeInTransaction("BackendModel::addNewBackend", + [this, metaInfo, typeName, propertyName, &dialog] { int minorVersion = metaInfo.minorVersion(); int majorVersion = metaInfo.majorVersion(); diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp index 97919fa4fe..0741b43430 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp @@ -374,7 +374,8 @@ void ConnectionModel::addConnection(const PropertyName &signalName) signalHandlerName = addOnToSignalName(QString::fromUtf8(signalHandlerName)).toUtf8(); connectionView() - ->executeInTransaction("ConnectionModel::addConnection", [=, &rootModelNode]() { + ->executeInTransaction("ConnectionModel::addConnection", + [this, nodeMetaInfo, signalHandlerName, &rootModelNode] { ModelNode newNode = connectionView() ->createModelNode("QtQuick.Connections", nodeMetaInfo.majorVersion(), diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarymaterialsmodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarymaterialsmodel.cpp index dee1000606..7594c691b5 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarymaterialsmodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarymaterialsmodel.cpp @@ -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()); diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp index 8b7c4d7d34..c885a76ba7 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp @@ -446,7 +446,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(const QDir &bundleDir) downloader->setProbeUrl(false); downloader->setDownloadEnabled(true); - QObject::connect(downloader, &FileDownloader::downloadFailed, this, [=]() { + QObject::connect(downloader, &FileDownloader::downloadFailed, this, + [this, metaFileExists, bundleDir] { if (metaFileExists) { if (fetchTextureBundleIcons(bundleDir)) { QString bundleIconPath = m_downloadPath + "/TextureBundleIcons"; @@ -459,7 +460,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(const QDir &bundleDir) } }); - QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() { + QObject::connect(downloader, &FileDownloader::finishedChanged, this, + [this, downloader, bundleDir, metaFileExists, filePath] { FileExtractor *extractor = new FileExtractor(this); extractor->setArchiveName(downloader->completeBaseName()); extractor->setSourceFile(downloader->outputFile()); @@ -469,7 +471,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(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, metaFileExists, filePath] { downloader->deleteLater(); extractor->deleteLater(); @@ -527,7 +530,8 @@ bool ContentLibraryWidget::fetchTextureBundleIcons(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()); @@ -535,7 +539,8 @@ bool ContentLibraryWidget::fetchTextureBundleIcons(const QDir &bundleDir) extractor->setAlwaysCreateDir(false); extractor->setClearTargetPathContents(false); - QObject::connect(extractor, &FileExtractor::finishedChanged, this, [=]() { + QObject::connect(extractor, &FileExtractor::finishedChanged, this, + [this, downloader, extractor] { downloader->deleteLater(); extractor->deleteLater(); diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp index 43efa6c567..12647f014c 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp @@ -643,11 +643,10 @@ void Edit3DView::createSeekerSliderAction() m_seekerAction->action()->setEnabled(false); m_seekerAction->action()->setToolTip(QLatin1String("Seek particle system time when paused.")); - connect(m_seekerAction->seekerAction(), - &SeekerSliderAction::valueChanged, - this, [=] (int value) { - this->emitView3DAction(View3DActionType::ParticlesSeek, value); - }); + connect(m_seekerAction->seekerAction(), &SeekerSliderAction::valueChanged, this, + [this] (int value) { + emitView3DAction(View3DActionType::ParticlesSeek, value); + }); } QPoint Edit3DView::resolveToolbarPopupPos(Edit3DAction *action) const diff --git a/src/plugins/qmldesigner/components/eventlist/eventlistview.cpp b/src/plugins/qmldesigner/components/eventlist/eventlistview.cpp index 6d5753eb31..3b9743210c 100644 --- a/src/plugins/qmldesigner/components/eventlist/eventlistview.cpp +++ b/src/plugins/qmldesigner/components/eventlist/eventlistview.cpp @@ -82,7 +82,7 @@ EventListModel *EventListView::eventListModel() const void EventListView::addEvent(const Event &event) { - executeInTransaction("EventListView::addEvent", [=]() { + executeInTransaction("EventListView::addEvent", [this, event] { QByteArray unqualifiedTypeName = "ListElement"; #ifdef QDS_USE_PROJECTSTORAGE @@ -110,7 +110,7 @@ void EventListView::addEvent(const Event &event) void EventListView::removeEvent(const QString &eventId) { - executeInTransaction("EventListView::removeEvent", [=]() { + executeInTransaction("EventListView::removeEvent", [this, eventId] { for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) { if (node.variantProperty("eventId").value().toString() == eventId) { node.destroy(); @@ -122,7 +122,7 @@ void EventListView::removeEvent(const QString &eventId) void EventListView::renameEvent(const QString &oldId, const QString &newId) { - executeInTransaction("EventListView::renameEvent", [=]() { + executeInTransaction("EventListView::renameEvent", [this, oldId, newId] { for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) { if (node.variantProperty("eventId").value().toString() == oldId) { node.variantProperty("eventId").setValue(newId); @@ -134,7 +134,7 @@ void EventListView::renameEvent(const QString &oldId, const QString &newId) void EventListView::setShortcut(const QString &id, const QString &text) { - executeInTransaction("EventListView::setShortcut", [=]() { + executeInTransaction("EventListView::setShortcut", [this, id, text] { for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) { if (node.variantProperty("eventId").value().toString() == id) { node.variantProperty("shortcut").setValue(text); @@ -146,7 +146,7 @@ void EventListView::setShortcut(const QString &id, const QString &text) void EventListView::setDescription(const QString &id, const QString &text) { - executeInTransaction("EventListView::setDescription", [=]() { + executeInTransaction("EventListView::setDescription", [this, id, text] { for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) { if (node.variantProperty("eventId").value().toString() == id) { node.variantProperty("eventDescription").setValue(text); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index a6f49e4012..841ac1fce1 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -628,11 +628,10 @@ DocumentWarningWidget *FormEditorWidget::errorWidget() { if (m_documentErrorWidget.isNull()) { m_documentErrorWidget = new DocumentWarningWidget(this); - connect(m_documentErrorWidget.data(), - &DocumentWarningWidget::gotoCodeClicked, - [=](const QString &, int codeLine, int codeColumn) { - m_formEditorView->gotoError(codeLine, codeColumn); - }); + connect(m_documentErrorWidget.data(), &DocumentWarningWidget::gotoCodeClicked, + [this](const QString &, int codeLine, int codeColumn) { + m_formEditorView->gotoError(codeLine, codeColumn); + }); } return m_documentErrorWidget; } diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp index 992ef2574f..5490829bb5 100644 --- a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp +++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp @@ -459,7 +459,7 @@ void MaterialEditorView::handlePreviewEnvChanged(const QString &envAndValue) if (parts.size() > 1) value = parts[1]; - auto renderPreviews = [=](const QString &auxEnv, const QString &auxValue) { + auto renderPreviews = [this](const QString &auxEnv, const QString &auxValue) { rootModelNode().setAuxiliaryData(materialPreviewEnvDocProperty, auxEnv); rootModelNode().setAuxiliaryData(materialPreviewEnvProperty, auxEnv); rootModelNode().setAuxiliaryData(materialPreviewEnvValueDocProperty, auxValue); @@ -491,13 +491,13 @@ void MaterialEditorView::handlePreviewEnvChanged(const QString &envAndValue) }); QObject::connect(m_colorDialog, &QColorDialog::colorSelected, - m_colorDialog, [=](const QColor &color) { + m_colorDialog, [this, renderPreviews, env](const QColor &color) { renderPreviews(env, color.name()); rootModelNode().setAuxiliaryData(materialPreviewColorDocProperty, color.name()); }); - QObject::connect(m_colorDialog, &QColorDialog::rejected, - m_colorDialog, [=]() { + QObject::connect(m_colorDialog, &QColorDialog::rejected, m_colorDialog, + [this, renderPreviews, oldEnv, oldValue] { renderPreviews(oldEnv, oldValue); initPreviewData(); }); diff --git a/src/plugins/qmldesigner/components/pathtool/pathtool.cpp b/src/plugins/qmldesigner/components/pathtool/pathtool.cpp index c430b17d78..e240e894d6 100644 --- a/src/plugins/qmldesigner/components/pathtool/pathtool.cpp +++ b/src/plugins/qmldesigner/components/pathtool/pathtool.cpp @@ -122,7 +122,7 @@ PathTool::PathTool(ExternalDependenciesInterface &externalDepoendencies) { auto textToolAction = new PathToolAction; QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction); - connect(textToolAction->action(), &QAction::triggered, [=]() { + connect(textToolAction->action(), &QAction::triggered, [this] { if (m_pathToolView.model()) m_pathToolView.model()->detachView(&m_pathToolView); view()->changeCurrentToolTo(this); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index b9a0dc9cc8..91e62bfef3 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -145,7 +145,7 @@ void PropertyEditorView::changeValue(const QString &name) if (QmlDesigner::ModelNode::isValidId(newId) && !hasId(newId)) { executeInTransaction("PropertyEditorView::changeId", - [=] { m_selectedNode.setIdWithRefactoring(newId); }); + [this, newId] { m_selectedNode.setIdWithRefactoring(newId); }); } else { m_locked = true; value->setValue(m_selectedNode.id()); diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp index 27bed8bb44..39c1f01ce6 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp @@ -127,7 +127,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent, } if (comboBox) { - connect(comboBox, &QComboBox::activated, this, [=] { + connect(comboBox, &QComboBox::activated, this, [this, comboBox] { auto delegate = const_cast<TimelineEditorDelegate *>(this); emit delegate->commitData(comboBox); }); diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp index 9cc45d1f33..c363f94409 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp @@ -336,7 +336,8 @@ const QmlTimeline TimelineView::addNewTimeline() ModelNode timelineNode; - executeInTransaction("TimelineView::addNewTimeline", [=, &timelineNode]() { + executeInTransaction("TimelineView::addNewTimeline", + [this, timelineType, metaInfo, &timelineNode] { bool hasTimelines = getTimelines().isEmpty(); QString currentStateName = getStateName(this, hasTimelines); @@ -371,7 +372,8 @@ ModelNode TimelineView::addAnimation(QmlTimeline timeline) ModelNode animationNode; - executeInTransaction("TimelineView::addAnimation", [=, &animationNode]() { + executeInTransaction("TimelineView::addAnimation", + [this, timeline, animationType, metaInfo, &animationNode] { bool hasAnimations = getAnimations(timeline).isEmpty(); QString currentStateName = getStateName(this, hasAnimations); diff --git a/src/plugins/qmldesigner/documentwarningwidget.cpp b/src/plugins/qmldesigner/documentwarningwidget.cpp index 49eb5acd46..9fb2b87635 100644 --- a/src/plugins/qmldesigner/documentwarningwidget.cpp +++ b/src/plugins/qmldesigner/documentwarningwidget.cpp @@ -42,7 +42,7 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent) m_ignoreWarningsCheckBox->setText(tr("Always ignore these warnings about features " "not supported by Qt Quick Designer.")); - connect(m_navigateLabel, &QLabel::linkActivated, this, [=](const QString &link) { + connect(m_navigateLabel, &QLabel::linkActivated, this, [this](const QString &link) { if (link == QLatin1String("goToCode")) { emitGotoCodeClicked(m_messages.at(m_currentMessage)); } else if (link == QLatin1String("previous")) { @@ -54,7 +54,7 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent) } }); - connect(m_continueButton, &QPushButton::clicked, this, [=]() { + connect(m_continueButton, &QPushButton::clicked, this, [this] { if (m_mode == ErrorMode) emitGotoCodeClicked(m_messages.at(m_currentMessage)); else diff --git a/src/plugins/qmldesigner/settingspage.cpp b/src/plugins/qmldesigner/settingspage.cpp index 2f3582cdf7..344e2700d9 100644 --- a/src/plugins/qmldesigner/settingspage.cpp +++ b/src/plugins/qmldesigner/settingspage.cpp @@ -267,7 +267,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie st} .attachTo(this); - connect(m_designerEnableDebuggerCheckBox, &QCheckBox::toggled, [=](bool checked) { + connect(m_designerEnableDebuggerCheckBox, &QCheckBox::toggled, [this](bool checked) { if (checked && ! m_designerShowDebuggerCheckBox->isChecked()) m_designerShowDebuggerCheckBox->setChecked(true); } @@ -288,7 +288,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie m_puppetBuildPathLineEdit, &QLineEdit::setEnabled); connect(resetStyle, &QPushButton::clicked, m_styleLineEdit, &QLineEdit::clear); - connect(m_controls2StyleComboBox, &QComboBox::currentTextChanged, [=]() { + connect(m_controls2StyleComboBox, &QComboBox::currentTextChanged, [this] { m_styleLineEdit->setText(m_controls2StyleComboBox->currentText()); }); |