forked from qt-creator/qt-creator
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:
@@ -87,7 +87,7 @@ CMakeEditor::CMakeEditor()
|
|||||||
const QString word = Text::wordUnderCursor(editorWidget()->textCursor());
|
const QString word = Text::wordUnderCursor(editorWidget()->textCursor());
|
||||||
const QString id = helpPrefix(word) + word;
|
const QString id = helpPrefix(word) + word;
|
||||||
if (id.startsWith("unknown/")) {
|
if (id.startsWith("unknown/")) {
|
||||||
BaseTextEditor::contextHelp(callback);
|
editorWidget()->contextHelpItem(callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user