forked from qt-creator/qt-creator
Fixed tooltips for enumerators
The helpId was working but the tooltip text was empty. Reviewed-by: Roberto
This commit is contained in:
@@ -92,6 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr
|
||||
if (ch.isLetterOrNumber() || ch == QLatin1Char('_'))
|
||||
text += QLatin1Char(' ');
|
||||
text += _name;
|
||||
} else {
|
||||
text += name;
|
||||
}
|
||||
(void) switchName(previousName);
|
||||
return text;
|
||||
|
||||
@@ -258,6 +258,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
|
||||
if (!types.isEmpty()) {
|
||||
FullySpecifiedType firstType = types.first().first;
|
||||
Symbol *symbol = types.first().second;
|
||||
FullySpecifiedType docType = firstType;
|
||||
|
||||
if (const PointerType *pt = firstType->asPointerType()) {
|
||||
@@ -266,8 +267,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
docType = rt->elementType();
|
||||
}
|
||||
|
||||
m_helpId = buildHelpId(docType, types.first().second);
|
||||
QString displayName = buildHelpId(firstType, types.first().second);
|
||||
m_helpId = buildHelpId(docType, symbol);
|
||||
QString displayName = buildHelpId(firstType, symbol);
|
||||
|
||||
if (!firstType->isClass() && !firstType->isNamedType()) {
|
||||
Overview overview;
|
||||
|
||||
Reference in New Issue
Block a user