Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
926144dc
Commit
926144dc
authored
Oct 09, 2009
by
Roberto Raggi
Browse files
Prefer Classes to constructors when building the `help id'
parent
8d9ccaff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphoverhandler.cpp
View file @
926144dc
...
...
@@ -337,6 +337,14 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
firstType
=
resolve
(
firstType
,
typeOfExpression
.
lookupContext
(),
&
resolvedSymbol
,
&
resolvedName
);
if
(
resolvedSymbol
&&
resolvedSymbol
->
scope
()
->
isClassScope
())
{
Class
*
enclosingClass
=
resolvedSymbol
->
scope
()
->
owner
()
->
asClass
();
if
(
Identifier
*
id
=
enclosingClass
->
identifier
())
{
if
(
id
->
isEqualTo
(
resolvedSymbol
->
identifier
()))
resolvedSymbol
=
enclosingClass
;
}
}
m_helpId
=
buildHelpId
(
resolvedSymbol
,
resolvedName
);
if
(
m_toolTip
.
isEmpty
())
{
...
...
@@ -349,7 +357,10 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
overview
.
setShowReturnTypes
(
true
);
overview
.
setShowFullyQualifiedNamed
(
true
);
if
(
lookupSymbol
&&
(
lookupSymbol
->
isDeclaration
()
||
lookupSymbol
->
isArgument
()))
{
if
(
symbol
==
resolvedSymbol
&&
symbol
->
isClass
())
{
m_toolTip
=
m_helpId
;
}
else
if
(
lookupSymbol
&&
(
lookupSymbol
->
isDeclaration
()
||
lookupSymbol
->
isArgument
()))
{
m_toolTip
=
overview
.
prettyType
(
firstType
,
buildHelpId
(
lookupSymbol
,
lookupSymbol
->
name
()));
}
else
if
(
firstType
->
isClassType
()
||
firstType
->
isEnumType
()
||
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment