diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 13824d827e6..e372b62bd91 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1049,7 +1049,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er VariableManager::registerFileVariables(Constants::VAR_CURRENTPROJECT_PREFIX, tr("Current project's main file"), - [&]() -> QString { + [this]() -> QString { QString projectFilePath; if (Project *project = ProjectExplorerPlugin::currentProject()) if (IDocument *doc = project->document())