CMake: Fix endless recursion if context help doesn't find anything

Amends baf20b8491

which removed the inheritance from the contextHelp method.
CMakeEditor now registers a context help function, which called
BaseTextEditor::contextHelp if no documentation was found, which was
correct when contextHelp was still virtual. Now
BaseTextEditor::contextHelp is the same as IContext::contextHelp which
calls the function that CMakeEditor registered again, leading to endless
recursion.

Change-Id: I912f69e0d0d3285c9fa77194f84b0819085c99b7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2024-07-18 10:04:52 +02:00
parent ed6228fd95
commit dbce96d888

View File

@@ -87,7 +87,7 @@ CMakeEditor::CMakeEditor()
const QString word = Text::wordUnderCursor(editorWidget()->textCursor());
const QString id = helpPrefix(word) + word;
if (id.startsWith("unknown/")) {
BaseTextEditor::contextHelp(callback);
editorWidget()->contextHelpItem(callback);
return;
}