From dbce96d888c669dce3de2c7159d8f4a4d4fc115b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 18 Jul 2024 10:04:52 +0200 Subject: [PATCH] CMake: Fix endless recursion if context help doesn't find anything Amends baf20b8491dde043510997180a71e1be26566af2 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 --- src/plugins/cmakeprojectmanager/cmakeeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index 5d01a1919cb..294273b4605 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -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; }