Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
345909a5
Commit
345909a5
authored
Oct 28, 2009
by
Roberto Raggi
Browse files
Fixed: Completion doesn't work for typedefs
Task-number: QTCREATORBUG-170
parent
aceeea96
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/ResolveExpression.cpp
View file @
345909a5
...
...
@@ -639,10 +639,19 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
}
}
if
(
ty
->
isNamedType
())
if
(
NamedType
*
namedTy
=
ty
->
asNamedType
())
{
const
QList
<
Scope
*>
visibleScopes
=
_context
.
visibleScopes
(
result
);
const
QList
<
Symbol
*>
typedefCandidates
=
_context
.
resolve
(
namedTy
->
name
(),
visibleScopes
);
foreach
(
Symbol
*
typedefCandidate
,
typedefCandidates
)
{
if
(
typedefCandidate
->
isTypedef
()
&&
typedefCandidate
->
type
()
->
isNamedType
())
{
ty
=
typedefCandidate
->
type
();
break
;
}
}
results
.
append
(
Result
(
ty
,
lastVisibleSymbol
));
else
if
(
Function
*
fun
=
ty
->
asFunctionType
())
{
}
else
if
(
Function
*
fun
=
ty
->
asFunctionType
())
{
Scope
*
funScope
=
fun
->
scope
();
if
(
funScope
&&
(
funScope
->
isBlockScope
()
||
funScope
->
isNamespaceScope
()))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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