CMakeProjectManager: Fix warning about shadowing

Amends a998269d7e

Change-Id: I5a36c3fc15e2913656a1d7bf7113ebd39cd6008c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2023-09-21 11:23:03 +02:00
committed by Cristian Adam
parent 811792df58
commit f3c84c6d4f

View File

@@ -60,7 +60,6 @@ CMakeEditor::CMakeEditor()
void CMakeEditor::contextHelp(const HelpCallback &callback) const
{
const QString word = Utils::Text::wordUnderCursor(editorWidget()->textCursor());
auto helpPrefix = [this](const QString &word) {
if (m_keywords.includeStandardModules.contains(word))
return "module/";
@@ -84,6 +83,7 @@ void CMakeEditor::contextHelp(const HelpCallback &callback) const
return "unknown/";
};
const QString word = Utils::Text::wordUnderCursor(editorWidget()->textCursor());
const QString id = helpPrefix(word) + word;
if (id.startsWith("unknown/")) {
BaseTextEditor::contextHelp(callback);