diff options
Diffstat (limited to 'src')
23 files changed, 76 insertions, 69 deletions
diff --git a/src/plugins/baremetal/debugservers/uvsc/uvtargetdriverviewer.cpp b/src/plugins/baremetal/debugservers/uvsc/uvtargetdriverviewer.cpp index 8e5a98fc08..7d5a8ff335 100644 --- a/src/plugins/baremetal/debugservers/uvsc/uvtargetdriverviewer.cpp +++ b/src/plugins/baremetal/debugservers/uvsc/uvtargetdriverviewer.cpp @@ -80,7 +80,7 @@ DriverSelector::DriverSelector(const QStringList &supportedDrivers, QWidget *par const auto detailsPanel = new DriverSelectorDetailsPanel(m_selection); setWidget(detailsPanel); - connect(toolPanel, &DriverSelectorToolPanel::clicked, this, [=] { + connect(toolPanel, &DriverSelectorToolPanel::clicked, this, [this, supportedDrivers] { DriverSelectionDialog dialog(m_toolsIniFile, supportedDrivers, this); const int result = dialog.exec(); if (result != QDialog::Accepted) diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp index 733951ba02..1edec4c290 100644 --- a/src/plugins/clangcodemodel/test/clangdtests.cpp +++ b/src/plugins/clangcodemodel/test/clangdtests.cpp @@ -1474,7 +1474,7 @@ void ClangdTestHighlighting::test() const auto lessThan = [=](const TextEditor::HighlightingResult &r, int) { return Text::positionInText(doc->document(), r.line, r.column) < startPos; }; - const auto findResults = [=] { + const auto findResults = [this, endPos, lessThan, doc] { TextEditor::HighlightingResults results; auto it = std::lower_bound(m_results.cbegin(), m_results.cend(), 0, lessThan); if (it == m_results.cend()) diff --git a/src/plugins/clangtools/diagnosticconfigswidget.cpp b/src/plugins/clangtools/diagnosticconfigswidget.cpp index 3d3ca943a7..b787777f9d 100644 --- a/src/plugins/clangtools/diagnosticconfigswidget.cpp +++ b/src/plugins/clangtools/diagnosticconfigswidget.cpp @@ -1196,7 +1196,7 @@ void DiagnosticConfigsWidget::handleChecksAsStringsButtonClicked(BaseChecksTreeM buttonsBox }.attachTo(&dialog); - QObject::connect(&dialog, &QDialog::accepted, this, [=, &initialChecks] { + QObject::connect(&dialog, &QDialog::accepted, this, [this, model, textEdit, &initialChecks] { const QString updatedChecks = textEdit->toPlainText(); if (updatedChecks == initialChecks) return; diff --git a/src/plugins/clangtools/filterdialog.cpp b/src/plugins/clangtools/filterdialog.cpp index 3486cb1261..abae4f2f85 100644 --- a/src/plugins/clangtools/filterdialog.cpp +++ b/src/plugins/clangtools/filterdialog.cpp @@ -95,8 +95,8 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent) buttonBox, }.attachTo(this); - connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [=] { - const bool hasSelection = !this->m_view->selectionModel()->selectedRows().isEmpty(); + connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this, buttonBox] { + const bool hasSelection = !m_view->selectionModel()->selectedRows().isEmpty(); buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection); }); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index c1d5c5913b..762499aaf7 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -554,7 +554,7 @@ void CMakeBuildSettingsWidget::batchEditConfiguration() connect(buttons, &QDialogButtonBox::accepted, dialog, &QDialog::accept); connect(buttons, &QDialogButtonBox::rejected, dialog, &QDialog::reject); - connect(dialog, &QDialog::accepted, this, [=]{ + connect(dialog, &QDialog::accepted, this, [this, editor] { const auto expander = m_buildConfig->macroExpander(); const QStringList lines = editor->toPlainText().split('\n', Qt::SkipEmptyParts); @@ -1012,7 +1012,7 @@ bool CMakeBuildSettingsWidget::eventFilter(QObject *target, QEvent *event) auto help = new QAction(Tr::tr("Help"), this); menu->addAction(help); - connect(help, &QAction::triggered, this, [=] { + connect(help, &QAction::triggered, this, [this, idx] { const CMakeConfigItem item = ConfigModel::dataItemFromIndex(idx).toCMakeConfigItem(); const CMakeTool *tool = CMakeKitAspect::cmakeTool(m_buildConfig->target()->kit()); diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index f78e6be0bc..49ca2fec8a 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -322,8 +322,8 @@ QObject *CorePlugin::remoteCommand(const QStringList & /* options */, { if (!ExtensionSystem::PluginManager::isInitializationDone()) { connect(ExtensionSystem::PluginManager::instance(), - &ExtensionSystem::PluginManager::initializationDone, - this, [=] { remoteCommand(QStringList(), workingDirectory, args); }); + &ExtensionSystem::PluginManager::initializationDone, this, + [this, workingDirectory, args] { remoteCommand({}, workingDirectory, args); }); return nullptr; } const FilePaths filePaths = Utils::transform(args, FilePath::fromUserInput); diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index 0eabd42e30..5882c8d164 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -616,12 +616,11 @@ void CppEditorWidget::renameUsages(const QString &replacement, QTextCursor curso cursor = textCursor(); // First check if the symbol to be renamed comes from a generated file. - LinkHandler continuation = [=, self = QPointer(this)](const Link &link) { + LinkHandler continuation = [this, cursor, replacement, self = QPointer(this)](const Link &link) { if (!self) return; showRenameWarningIfFileIsGenerated(link.targetFilePath); - CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this, textDocument()}; - QPointer<CppEditorWidget> cppEditorWidget = this; + const CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this, textDocument()}; CppModelManager::globalRename(cursorInEditor, replacement); }; CppModelManager::followSymbol(CursorInEditor{cursor, @@ -847,7 +846,8 @@ void CppEditorWidget::renameSymbolUnderCursor() QPointer<CppEditorWidget> cppEditorWidget = this; - auto renameSymbols = [=](const QString &symbolName, const Links &links, int revision) { + auto renameSymbols = [this, cppEditorWidget](const QString &symbolName, const Links &links, + int revision) { if (cppEditorWidget) { viewport()->setCursor(Qt::IBeamCursor); @@ -1121,8 +1121,8 @@ QMenu *CppEditorWidget::createRefactorMenu(QWidget *parent) const auto *progressIndicatorMenuItem = new ProgressIndicatorMenuItem(menu); menu->addAction(progressIndicatorMenuItem); - connect(&d->m_useSelectionsUpdater, &CppUseSelectionsUpdater::finished, - menu, [=] (SemanticInfo::LocalUseMap, bool success) { + connect(&d->m_useSelectionsUpdater, &CppUseSelectionsUpdater::finished, menu, + [this, menu, progressIndicatorMenuItem] (SemanticInfo::LocalUseMap, bool success) { QTC_CHECK(success); menu->removeAction(progressIndicatorMenuItem); addRefactoringActions(menu); diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index b4a844b396..5c40ad9ce8 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -4783,8 +4783,9 @@ public: checkbox->setCheckState(Qt::Checked); }; using Column = CandidateTreeItem::Column; - const auto createConnections = [=](QCheckBox *checkbox, Column column) { - connect(checkbox, &QCheckBox::stateChanged, [setCheckStateForAll, column](int state) { + const auto createConnections = [this, setCheckStateForAll, preventPartiallyChecked]( + QCheckBox *checkbox, Column column) { + connect(checkbox, &QCheckBox::stateChanged, this, [setCheckStateForAll, column](int state) { if (state != Qt::PartiallyChecked) setCheckStateForAll(column, state); }); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 8f4750033a..31c57af0c1 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -1397,7 +1397,7 @@ void CdbEngine::fetchMemory(MemoryAgent *agent, quint64 address, quint64 length) StringInputStream str(args); str << address << ' ' << length; cmd.args = args; - cmd.callback = [=](const DebuggerResponse &response) { + cmd.callback = [this, agent, length, address](const DebuggerResponse &response) { if (!agent) return; if (response.resultClass == ResultDone) { diff --git a/src/plugins/fossil/fossilclient.cpp b/src/plugins/fossil/fossilclient.cpp index d05e596ae2..e892978799 100644 --- a/src/plugins/fossil/fossilclient.cpp +++ b/src/plugins/fossil/fossilclient.cpp @@ -708,7 +708,8 @@ void FossilClient::annotate(const FilePath &workingDir, const QString &file, int if (VcsBaseEditorConfig *editorConfig = createAnnotateEditor(fossilEditor)) { editorConfig->setBaseArguments(extraOptions); // editor has been just created, createVcsEditor() didn't set a configuration widget yet - connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, [=] { + connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, + [this, workingDir, file, revision, editorConfig] { const int line = VcsBaseEditor::lineNumberOfCurrentEditor(); annotate(workingDir, file, line, revision, editorConfig->arguments()); }); @@ -914,7 +915,8 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files, if (VcsBaseEditorConfig *editorConfig = createLogEditor(fossilEditor)) { editorConfig->setBaseArguments(extraOptions); // editor has been just created, createVcsEditor() didn't set a configuration widget yet - connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, [=] { + connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, + [this, workingDir, files, editorConfig, enableAnnotationContextMenu, addAuthOptions] { log(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); }); @@ -969,7 +971,8 @@ void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList if (VcsBaseEditorConfig *editorConfig = createLogCurrentFileEditor(fossilEditor)) { editorConfig->setBaseArguments(extraOptions); // editor has been just created, createVcsEditor() didn't set a configuration widget yet - connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, [=] { + connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, + [this, workingDir, files, editorConfig, enableAnnotationContextMenu, addAuthOptions] { logCurrentFile(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); }); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 901c3d57a0..6f9224dda0 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1055,7 +1055,9 @@ void GitClient::log(const FilePath &workingDirectory, const QString &fileName, argWidget = new GitLogArgumentsWidget(!fileName.isEmpty(), editor); argWidget->setBaseArguments(args); connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this, - [=] { this->log(workingDir, fileName, enableAnnotationContextMenu, args); }); + [this, workingDir, fileName, enableAnnotationContextMenu, args] { + log(workingDir, fileName, enableAnnotationContextMenu, args); + }); editor->setEditorConfig(argWidget); } editor->setFileLogAnnotateEnabled(enableAnnotationContextMenu); @@ -1112,7 +1114,7 @@ void GitClient::reflog(const FilePath &workingDirectory, const QString &ref) if (!ref.isEmpty()) argWidget->setBaseArguments({ref}); connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this, - [=] { this->reflog(workingDir, ref); }); + [this, workingDir, ref] { reflog(workingDir, ref); }); editor->setEditorConfig(argWidget); } editor->setWorkingDirectory(workingDir); @@ -1222,7 +1224,8 @@ void GitClient::annotate(const Utils::FilePath &workingDir, const QString &file, if (!argWidget) { argWidget = new GitBlameArgumentsWidget(editor->toolBar()); argWidget->setBaseArguments(extraOptions); - connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this, [=] { + connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this, + [this, workingDir, file, revision, extraOptions] { const int line = VcsBaseEditor::lineNumberOfCurrentEditor(); annotate(workingDir, file, line, revision, extraOptions); }); @@ -1248,7 +1251,7 @@ void GitClient::checkout(const FilePath &workingDirectory, const QString &ref, S return; const QStringList arguments = setupCheckoutArguments(workingDirectory, ref); - const auto commandHandler = [=](const CommandResult &result) { + const auto commandHandler = [this, stashMode, workingDirectory, handler](const CommandResult &result) { if (stashMode == StashMode::TryStash) endStashScope(workingDirectory); if (result.result() == ProcessResult::FinishedWithSuccess) @@ -2442,7 +2445,8 @@ void GitClient::tryLaunchingGitK(const Environment &env, process->setWorkingDirectory(workingDirectory); process->setEnvironment(env); process->setCommand({binary, arguments}); - connect(process, &Process::done, this, [=] { + connect(process, &Process::done, this, + [this, process, env, workingDirectory, fileName, trial, gitBinDirectory] { if (process->result() == ProcessResult::StartFailed) handleGitKFailedToStart(env, workingDirectory, fileName, trial, gitBinDirectory); process->deleteLater(); diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index f561ed4140..4f3ee3fbc3 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -227,7 +227,9 @@ public: menu->addAction(Tr::tr("&Copy \"%1\"").arg(reference), [reference] { setClipboardAndSelection(reference); }); QAction *action = menu->addAction(Tr::tr("&Describe Change %1").arg(reference), - [=] { vcsDescribe(workingDirectory, reference); }); + [this, workingDirectory, reference] { + vcsDescribe(workingDirectory, reference); + }); menu->setDefaultAction(action); GitClient::addChangeActions(menu, workingDirectory, reference); } @@ -741,7 +743,7 @@ GitPluginPrivate::GitPluginPrivate() Tr::tr("Update Submodules"), "Git.SubmoduleUpdate", context, true, std::bind(&GitPluginPrivate::updateSubmodules, this)); - auto createAction = [=](const QString &text, Id id, + auto createAction = [this, localRepositoryMenu, context](const QString &text, Id id, const std::function<void(const FilePath &)> &callback) { auto actionHandler = [this, callback] { if (!DocumentManager::saveAllModifiedDocuments()) diff --git a/src/plugins/ios/iosbuildstep.cpp b/src/plugins/ios/iosbuildstep.cpp index 52a5eecda7..8edfb3dbc2 100644 --- a/src/plugins/ios/iosbuildstep.cpp +++ b/src/plugins/ios/iosbuildstep.cpp @@ -100,20 +100,23 @@ QWidget *IosBuildStep::createConfigWidget() updateDetails(); - connect(buildArgumentsTextEdit, &QPlainTextEdit::textChanged, this, [=] { + connect(buildArgumentsTextEdit, &QPlainTextEdit::textChanged, this, + [this, buildArgumentsTextEdit, resetDefaultsButton, updateDetails] { setBaseArguments(ProcessArgs::splitArgs(buildArgumentsTextEdit->toPlainText(), HostOsInfo::hostOs())); resetDefaultsButton->setEnabled(!m_useDefaultArguments); updateDetails(); }); - connect(resetDefaultsButton, &QAbstractButton::clicked, this, [=] { + connect(resetDefaultsButton, &QAbstractButton::clicked, this, + [this, buildArgumentsTextEdit, resetDefaultsButton] { setBaseArguments(defaultArguments()); buildArgumentsTextEdit->setPlainText(ProcessArgs::joinArgs(baseArguments())); resetDefaultsButton->setEnabled(!m_useDefaultArguments); }); - connect(extraArgumentsLineEdit, &QLineEdit::editingFinished, this, [=] { + connect(extraArgumentsLineEdit, &QLineEdit::editingFinished, this, + [this, extraArgumentsLineEdit] { setExtraArguments(ProcessArgs::splitArgs(extraArgumentsLineEdit->text(), HostOsInfo::hostOs())); }); diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 81da8bfef3..811404b2da 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -885,7 +885,8 @@ void IosSimulatorToolHandlerPrivate::launchAppOnSimulator(const QStringList &ext stop(0); }; - auto onResponseAppLaunch = [=](const SimulatorControl::Response &response) { + auto onResponseAppLaunch = [this, captureConsole, monitorPid, stdoutFile, stderrFile]( + const SimulatorControl::Response &response) { if (response) { if (!isResponseValid(*response)) return; diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index 0502c404f2..4a712d695f 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -105,7 +105,7 @@ public: } void sendMessage(const JsonRpcMessage &message) { - QMetaObject::invokeMethod(m_interface, [=]() { m_interface->sendMessage(message); }); + QMetaObject::invokeMethod(m_interface, [this, message] { m_interface->sendMessage(message); }); } void resetBuffer() { diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp index 82d80f4c27..0a4da9b874 100644 --- a/src/plugins/languageclient/languageclientsettings.cpp +++ b/src/plugins/languageclient/languageclientsettings.cpp @@ -1135,10 +1135,8 @@ public: group->layout()->addWidget(editor->widget()); layout->addWidget(group); - connect(editor->editorWidget()->textDocument(), - &TextEditor::TextDocument::contentsChanged, - this, - [=] { m_settings.setJson(editor->document()->contents()); }); + connect(editor->editorWidget()->textDocument(), &TextEditor::TextDocument::contentsChanged, + this, [this, editor] { m_settings.setJson(editor->document()->contents()); }); } private: diff --git a/src/plugins/python/pyside.cpp b/src/plugins/python/pyside.cpp index e8694a61e4..5df87ff1bb 100644 --- a/src/plugins/python/pyside.cpp +++ b/src/plugins/python/pyside.cpp @@ -114,9 +114,9 @@ void PySideInstaller::installPyside(const FilePath &python, auto install = new PipInstallTask(python); connect(install, &PipInstallTask::finished, install, &QObject::deleteLater); - connect(install, &PipInstallTask::finished, this, [=](bool success){ + connect(install, &PipInstallTask::finished, this, [this, python, pySide](bool success) { if (success) - emit this->pySideInstalled(python, pySide); + emit pySideInstalled(python, pySide); }); if (availablePySides.isEmpty()) { install->setPackages({PipPackage(pySide)}); @@ -184,7 +184,7 @@ void PySideInstaller::handlePySideMissing(const FilePath &python, const QString message = Tr::tr("%1 installation missing for %2 (%3)") .arg(pySide, pythonName(python), python.toUserOutput()); InfoBarEntry info(installPySideInfoBarId, message, InfoBarEntry::GlobalSuppression::Enabled); - auto installCallback = [=] { this->installPyside(python, pySide, document); }; + auto installCallback = [this, python, pySide, document] { installPyside(python, pySide, document); }; const QString installTooltip = Tr::tr("Install %1 for %2 using pip package installer.") .arg(pySide, python.toUserOutput()); info.addCustomButton(Tr::tr("Install"), installCallback, installTooltip); @@ -204,10 +204,8 @@ void PySideInstaller::runPySideChecker(const FilePath &python, if (watcher) watcher->cancel(); }); - connect(watcher, - &CheckPySideWatcher::resultReadyAt, - this, - [=, document = QPointer<TextEditor::TextDocument>(document)]() { + connect(watcher, &CheckPySideWatcher::resultReadyAt, this, + [this, watcher, python, pySide, document = QPointer<TextEditor::TextDocument>(document)] { if (watcher->result()) handlePySideMissing(python, pySide, document); }); diff --git a/src/plugins/python/pythonbuildconfiguration.cpp b/src/plugins/python/pythonbuildconfiguration.cpp index c958692a72..9e1192bcd8 100644 --- a/src/plugins/python/pythonbuildconfiguration.cpp +++ b/src/plugins/python/pythonbuildconfiguration.cpp @@ -103,8 +103,9 @@ void PySideBuildStep::checkForPySide(const FilePath &python, const QString &pySi const PipPackage package(pySidePackageName); QObject::disconnect(m_watcherConnection); m_watcher.reset(new QFutureWatcher<PipPackageInfo>()); - m_watcherConnection = QObject::connect(m_watcher.get(), &QFutureWatcherBase::finished, this, [=] { - this->handlePySidePackageInfo(m_watcher->result(), python, pySidePackageName); + m_watcherConnection = QObject::connect(m_watcher.get(), &QFutureWatcherBase::finished, this, + [this, python, pySidePackageName] { + handlePySidePackageInfo(m_watcher->result(), python, pySidePackageName); }); const auto future = Pip::instance(python)->info(package); m_watcher->setFuture(future); diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index dcba4d1ac6..dbe6c434de 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -283,7 +283,8 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python, auto install = new PipInstallTask(python); - connect(install, &PipInstallTask::finished, this, [=](const bool success) { + connect(install, &PipInstallTask::finished, this, + [this, python, document, install](const bool success) { const QList<TextEditor::TextDocument *> additionalDocuments = m_infoBarEntries.take(python); if (success) { if (PyLSClient *client = clientForPython(python)) { @@ -323,10 +324,8 @@ void PyLSConfigureAssistant::openDocument(const FilePath &python, TextEditor::Te } }); - connect(watcher, - &CheckPylsWatcher::resultReadyAt, - this, - [=, document = QPointer<TextEditor::TextDocument>(document)]() { + connect(watcher, &CheckPylsWatcher::resultReadyAt, this, + [this, watcher, python, document = QPointer<TextEditor::TextDocument>(document)] { if (!document || !watcher) return; handlePyLSState(python, watcher->result(), document); @@ -355,8 +354,8 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, Utils::InfoBarEntry info(installPylsInfoBarId, message, Utils::InfoBarEntry::GlobalSuppression::Enabled); - info.addCustomButton(Tr::tr("Install"), [=]() { - this->installPythonLanguageServer(python, document, state.pylsModulePath); + info.addCustomButton(Tr::tr("Install"), [this, python, document, state] { + installPythonLanguageServer(python, document, state.pylsModulePath); }); infoBar->addInfo(info); m_infoBarEntries[python] << document; diff --git a/src/plugins/scxmleditor/common/mainwidget.cpp b/src/plugins/scxmleditor/common/mainwidget.cpp index a023c0b8e7..8fda073a33 100644 --- a/src/plugins/scxmleditor/common/mainwidget.cpp +++ b/src/plugins/scxmleditor/common/mainwidget.cpp @@ -346,16 +346,16 @@ void MainWidget::init() // Connect alignment change alignToolButton->setProperty("currentAlignment", ActionAlignLeft); - connect(alignToolButton, &QToolButton::clicked, this, [=] { - StateView *view = this->m_views.last(); + connect(alignToolButton, &QToolButton::clicked, this, [this, alignToolButton] { + StateView *view = m_views.last(); if (view) view->scene()->alignStates(alignToolButton->property("currentAlignment").toInt()); }); // Connect alignment change adjustToolButton->setProperty("currentAdjustment", ActionAdjustWidth); - connect(adjustToolButton, &QToolButton::clicked, this, [=] { - StateView *view = this->m_views.last(); + connect(adjustToolButton, &QToolButton::clicked, this, [this, adjustToolButton] { + StateView *view = m_views.last(); if (view) view->scene()->adjustStates(adjustToolButton->property("currentAdjustment").toInt()); }); @@ -479,7 +479,7 @@ void MainWidget::addStateView(BaseItem *item) view->scene()->setWarningModel(m_errorPane->warningModel()); view->setUiFactory(m_uiFactory); - connect(view, &QObject::destroyed, this, [=] { + connect(view, &QObject::destroyed, this, [this, view] { // TODO: un-lambdafy m_views.removeAll(view); m_document->popRootTag(); diff --git a/src/plugins/scxmleditor/outputpane/outputtabwidget.cpp b/src/plugins/scxmleditor/outputpane/outputtabwidget.cpp index b4b28883ac..869abbb770 100644 --- a/src/plugins/scxmleditor/outputpane/outputtabwidget.cpp +++ b/src/plugins/scxmleditor/outputpane/outputtabwidget.cpp @@ -42,12 +42,12 @@ PaneTitleButton::PaneTitleButton(OutputPane *pane, QWidget *parent) } }); - connect(pane, &OutputPane::titleChanged, this, [=] { - this->setText(pane->title()); + connect(pane, &OutputPane::titleChanged, this, [this, pane] { + setText(pane->title()); }); - connect(pane, &OutputPane::iconChanged, this, [=] { - this->setIcon(pane->icon()); + connect(pane, &OutputPane::iconChanged, this, [this, pane] { + setIcon(pane->icon()); }); } diff --git a/src/plugins/scxmleditor/outputpane/warningmodel.cpp b/src/plugins/scxmleditor/outputpane/warningmodel.cpp index badbeef5ad..ab0c3cc10d 100644 --- a/src/plugins/scxmleditor/outputpane/warningmodel.cpp +++ b/src/plugins/scxmleditor/outputpane/warningmodel.cpp @@ -186,7 +186,7 @@ Warning *WarningModel::createWarning(Warning::Severity severity, const QString & beginInsertRows(QModelIndex(), m_warnings.count(), m_warnings.count()); auto warning = new Warning(severity, type, reason, description, m_warningVisibilities.value(severity, true)); connect(warning, &Warning::destroyed, this, &WarningModel::warningDestroyed); - connect(warning, &Warning::dataChanged, this, [=] { + connect(warning, &Warning::dataChanged, this, [this, warning] { emit warningsChanged(); QModelIndex ind = createIndex(m_warnings.indexOf(warning), 0); emit dataChanged(ind, ind); diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 8e8e8a3e8d..ea2ddcadc5 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -413,12 +413,9 @@ void VcsBaseClient::log(const FilePath &workingDir, if (editorConfig) { editorConfig->setBaseArguments(extraOptions); // editor has been just created, createVcsEditor() didn't set a configuration widget yet - connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, [=] { - this->log(workingDir, - files, - extraOptions, - enableAnnotationContextMenu, - addAuthOptions); + connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, this, + [this, workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions] { + log(workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions); }); editor->setEditorConfig(editorConfig); } |