diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-06-11 17:00:35 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-06-11 17:03:29 +0200 |
commit | f17a81c9c926a73d2b9f56746b9b4e263c0c22f1 (patch) | |
tree | 49f5717f1d84dc55a81c03783f5ff7d20ae481fa | |
parent | d44655bde2ac6aea4113de12ef67efa2808e7da9 (diff) |
Fixed helpId and tooltip for member declarations.
-rw-r--r-- | src/plugins/cppeditor/cpphoverhandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index 1022fc1374f..2850bcd92d5 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -327,8 +327,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in FullySpecifiedType firstType = result.first; // result of `type of expression'. Symbol *lookupSymbol = result.second; // lookup symbol - Symbol *resolvedSymbol = 0; - Name *resolvedName = 0; + Symbol *resolvedSymbol = lookupSymbol; + Name *resolvedName = lookupSymbol->name(); firstType = resolve(firstType, typeOfExpression.lookupContext(), &resolvedSymbol, &resolvedName); @@ -343,9 +343,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in overview.setShowReturnTypes(true); overview.setShowFullyQualifiedNamed(true); - if (lookupSymbol && lookupSymbol->isDeclaration()) { - Declaration *decl = lookupSymbol->asDeclaration(); - m_toolTip = overview.prettyType(firstType, decl->name()); + if (lookupSymbol && (lookupSymbol->isDeclaration() || lookupSymbol->isArgument())) { + m_toolTip = overview.prettyType(firstType, buildHelpId(lookupSymbol, lookupSymbol->name())); } else if (firstType->isClassType() || firstType->isEnumType() || firstType->isForwardClassDeclarationType()) { |