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;
|
||||
QString m_helpToolTip;
|
||||
QString m_contextHelp;
|
||||
QVariant m_contextHelp;
|
||||
|
||||
public:
|
||||
const CMakeKeywords &keywords() const;
|
||||
@@ -469,12 +469,8 @@ void CMakeHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget
|
||||
if (!helpFile.isEmpty())
|
||||
m_helpToolTip = CMakeToolManager::toolTipForRstHelpFile(helpFile);
|
||||
|
||||
if (auto tool = CMakeToolManager::defaultProjectOrDefaultCMakeTool())
|
||||
m_contextHelp = QString("%1/%2/%3")
|
||||
.arg(tool->documentationUrl(tool->version(),
|
||||
tool->qchFilePath().isEmpty()),
|
||||
helpCategory,
|
||||
word);
|
||||
m_contextHelp = QVariant::fromValue(
|
||||
HelpItem({QString("%1/%2").arg(helpCategory, word), word}, {}, {}, HelpItem::Unknown));
|
||||
|
||||
setPriority(!m_helpToolTip.isEmpty() ? Priority_Tooltip : Priority_None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user