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
70bdb372
Commit
70bdb372
authored
Nov 04, 2009
by
Roberto Raggi
Browse files
Resolve fully qualified names.
parent
a67e1394
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/CppBindings.cpp
View file @
70bdb372
...
...
@@ -152,6 +152,25 @@ ClassBinding *NamespaceBinding::findClassBinding(Name *name, QSet<Binding *> *pr
if
(
processed
->
contains
(
this
))
return
0
;
if
(
const
QualifiedNameId
*
q
=
name
->
asQualifiedNameId
())
{
Binding
*
current
=
this
;
for
(
unsigned
i
=
0
;
i
<
q
->
nameCount
();
++
i
)
{
Identifier
*
nameId
=
q
->
nameAt
(
i
)
->
identifier
();
if
(
!
nameId
)
return
0
;
QSet
<
Binding
*>
visited
;
Binding
*
binding
=
current
->
findClassOrNamespaceBinding
(
nameId
,
&
visited
);
// ### TODO: check recursion.
if
(
!
binding
)
return
0
;
current
=
binding
;
}
return
current
->
asClassBinding
();
}
processed
->
insert
(
this
);
Identifier
*
id
=
name
->
identifier
();
...
...
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