From 1d0246a89a360cdc67d111ce1ac0ccf1cb288d66 Mon Sep 17 00:00:00 2001 From: Sami Shalayel Date: Mon, 18 Mar 2024 16:21:32 +0100 Subject: [PATCH] qmljshoverhandler: do not show tooltips when qmlls is enabled Check if qmlls is enabled before showing tooltips from the QtC's code model. This way, other hoverhandlers, like the one used for language servers, have the possibility to show their tooltip. Task-number: QTCREATORBUG-29826 Change-Id: I5d879c7d4c04a27bc668e8900f54984788b02727 Reviewed-by: Fabian Kosmale --- src/plugins/qmljseditor/qmljshoverhandler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index 3f7d3a5c110..9dcc220e253 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -7,6 +7,7 @@ #include "qmljseditordocument.h" #include "qmljseditortr.h" #include "qmljshoverhandler.h" +#include "qmljseditingsettingspage.h" #include #include @@ -371,6 +372,12 @@ void QmlJSHoverHandler::reset() void QmlJSHoverHandler::operateTooltip(TextEditorWidget *editorWidget, const QPoint &point) { + // disable hoverhandling in case qmlls is enabled + if (QmlJsEditingSettings::get().qmllsSettings().useQmlls) { + BaseHoverHandler::operateTooltip(editorWidget, point); + return; + } + if (toolTip().isEmpty()) Utils::ToolTip::hide(); else if (m_colorTip.isValid())