diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index da6185ba3c2..da8a0dfb513 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -617,8 +617,7 @@ ToolChain::BuiltInHeaderPathsRunner GccToolChain::createBuiltInHeaderPathsRunner addToEnvironment(fullEnv); // This runner must be thread-safe! - return [this, - fullEnv, + return [fullEnv, compilerCommand = compilerCommand(), platformCodeGenFlags = m_platformCodeGenFlags, reinterpretOptions = m_optionsReinterpreter, @@ -1381,7 +1380,7 @@ void ClangToolChain::syncAutodetectedWithParentToolchains() if (!ToolChainManager::isLoaded()) { QObject::connect(ToolChainManager::instance(), &ToolChainManager::toolChainsLoaded, - [this, id = id()] { + [id = id()] { if (ToolChain * const tc = ToolChainManager::findToolChain(id)) { if (tc->typeId() == Constants::CLANG_TOOLCHAIN_TYPEID) static_cast(tc)->syncAutodetectedWithParentToolchains(); @@ -1535,8 +1534,7 @@ ToolChain::BuiltInHeaderPathsRunner ClangToolChain::createBuiltInHeaderPathsRunn addToEnvironment(fullEnv); // This runner must be thread-safe! - return [this, - fullEnv, + return [fullEnv, compilerCommand = compilerCommand(), platformCodeGenFlags = m_platformCodeGenFlags, reinterpretOptions = m_optionsReinterpreter, diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp index 5d9e43acc90..77aada46060 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp @@ -514,8 +514,8 @@ bool JsonWizardFactory::isAvailable(Utils::Id platformId) const expander.registerVariable("Platform", tr("The platform selected for the wizard."), [platformId]() { return platformId.toString(); }); expander.registerVariable("Features", tr("The features available to this wizard."), - [this, e, platformId]() { return JsonWizard::stringListToArrayString(Utils::Id::toStringList(availableFeatures(platformId)), e); }); - expander.registerVariable("Plugins", tr("The plugins loaded."), [this, e]() { + [e, platformId]() { return JsonWizard::stringListToArrayString(Utils::Id::toStringList(availableFeatures(platformId)), e); }); + expander.registerVariable("Plugins", tr("The plugins loaded."), [e]() { return JsonWizard::stringListToArrayString(Utils::Id::toStringList(pluginFeatures()), e); }); Core::JsExpander jsExpander; diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index b136fa61744..f68bd9cd362 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -371,7 +371,7 @@ UserFileAccessor::merge(const MergingSettingsAccessor::SettingsMergeData &global // the .user and .shared files, this setting will "unstick". SettingsMergeFunction UserFileAccessor::userStickyTrackerFunction(QStringList &stickyKeys) const { - return [this, &stickyKeys](const SettingsMergeData &global, const SettingsMergeData &local) + return [&stickyKeys](const SettingsMergeData &global, const SettingsMergeData &local) -> SettingsMergeResult { const QString key = local.key; const QVariant main = local.main.value(key); diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp index 1d238a265cc..800dc0c523b 100644 --- a/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp @@ -159,7 +159,7 @@ QToolBar *CurveEditor::createToolBar(CurveEditorModel *model) cfspin->setMaximum(std::numeric_limits::max()); auto intSignal = static_cast(&QSpinBox::valueChanged); - connect(cfspin, intSignal, [this, model](int val) { model->commitCurrentFrame(val); }); + connect(cfspin, intSignal, [model](int val) { model->commitCurrentFrame(val); }); connect(m_view, &GraphicsView::currentFrameChanged, [cfspin](int val, bool notify) { if (notify) { cfspin->setValue(val);