Skip to content
Snippets Groups Projects
Commit 233502a7 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed tooltips for enumerators

The helpId was working but the tooltip text was empty.

Reviewed-by: Roberto
parent 903457ee
No related branches found
No related tags found
No related merge requests found
...@@ -92,6 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr ...@@ -92,6 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr
if (ch.isLetterOrNumber() || ch == QLatin1Char('_')) if (ch.isLetterOrNumber() || ch == QLatin1Char('_'))
text += QLatin1Char(' '); text += QLatin1Char(' ');
text += _name; text += _name;
} else {
text += name;
} }
(void) switchName(previousName); (void) switchName(previousName);
return text; return text;
......
...@@ -258,6 +258,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in ...@@ -258,6 +258,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
if (!types.isEmpty()) { if (!types.isEmpty()) {
FullySpecifiedType firstType = types.first().first; FullySpecifiedType firstType = types.first().first;
Symbol *symbol = types.first().second;
FullySpecifiedType docType = firstType; FullySpecifiedType docType = firstType;
if (const PointerType *pt = firstType->asPointerType()) { if (const PointerType *pt = firstType->asPointerType()) {
...@@ -266,8 +267,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in ...@@ -266,8 +267,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
docType = rt->elementType(); docType = rt->elementType();
} }
m_helpId = buildHelpId(docType, types.first().second); m_helpId = buildHelpId(docType, symbol);
QString displayName = buildHelpId(firstType, types.first().second); QString displayName = buildHelpId(firstType, symbol);
if (!firstType->isClass() && !firstType->isNamedType()) { if (!firstType->isClass() && !firstType->isNamedType()) {
Overview overview; Overview overview;
...@@ -297,7 +298,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in ...@@ -297,7 +298,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
m_helpEngineNeedsSetup = false; m_helpEngineNeedsSetup = false;
} }
if (! m_toolTip.isEmpty()) if (!m_toolTip.isEmpty())
m_toolTip = Qt::escape(m_toolTip); m_toolTip = Qt::escape(m_toolTip);
if (!m_helpId.isEmpty() && !m_helpEngine->linksForIdentifier(m_helpId).isEmpty()) { if (!m_helpId.isEmpty() && !m_helpEngine->linksForIdentifier(m_helpId).isEmpty()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment