forked from qt-creator/qt-creator
CMakePM: Fix opening context help via F1 in hover tooltip
Change-Id: I9ebd6a6ec8e00c63bd6f9182ba8530944f3437ea Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -411,7 +411,7 @@ class CMakeHoverHandler : public TextEditor::BaseHoverHandler
|
|||||||
{
|
{
|
||||||
mutable CMakeKeywords m_keywords;
|
mutable CMakeKeywords m_keywords;
|
||||||
QString m_helpToolTip;
|
QString m_helpToolTip;
|
||||||
QString m_contextHelp;
|
QVariant m_contextHelp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const CMakeKeywords &keywords() const;
|
const CMakeKeywords &keywords() const;
|
||||||
@@ -469,12 +469,8 @@ void CMakeHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget
|
|||||||
if (!helpFile.isEmpty())
|
if (!helpFile.isEmpty())
|
||||||
m_helpToolTip = CMakeToolManager::toolTipForRstHelpFile(helpFile);
|
m_helpToolTip = CMakeToolManager::toolTipForRstHelpFile(helpFile);
|
||||||
|
|
||||||
if (auto tool = CMakeToolManager::defaultProjectOrDefaultCMakeTool())
|
m_contextHelp = QVariant::fromValue(
|
||||||
m_contextHelp = QString("%1/%2/%3")
|
HelpItem({QString("%1/%2").arg(helpCategory, word), word}, {}, {}, HelpItem::Unknown));
|
||||||
.arg(tool->documentationUrl(tool->version(),
|
|
||||||
tool->qchFilePath().isEmpty()),
|
|
||||||
helpCategory,
|
|
||||||
word);
|
|
||||||
|
|
||||||
setPriority(!m_helpToolTip.isEmpty() ? Priority_Tooltip : Priority_None);
|
setPriority(!m_helpToolTip.isEmpty() ? Priority_Tooltip : Priority_None);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user