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
Marco Bubke
flatpak-qt-creator
Commits
f1a40d30
Commit
f1a40d30
authored
Feb 03, 2009
by
Roberto Raggi
Browse files
Fixes: Member completion when the symbol's type is ClassTy.
For example, struct { int a, b } foo; int main() { foo. <- }
parent
63a5f15f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppcodecompletion.cpp
View file @
f1a40d30
...
...
@@ -598,7 +598,9 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
if
(
ReferenceType
*
refTy
=
ty
->
asReferenceType
())
ty
=
refTy
->
elementType
();
if
(
NamedType
*
namedTy
=
ty
->
asNamedType
())
{
if
(
Class
*
classTy
=
ty
->
asClass
())
{
classObjectCandidates
.
append
(
classTy
);
}
else
if
(
NamedType
*
namedTy
=
ty
->
asNamedType
())
{
// ### This code is pretty slow.
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
namedTy
->
name
());
foreach
(
Symbol
*
candidate
,
candidates
)
{
...
...
@@ -697,6 +699,8 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
++
m_startPosition
;
namedTy
=
ptrTy
->
elementType
()
->
asNamedType
();
}
}
else
if
(
Class
*
classTy
=
ty
->
asClass
())
{
classObjectCandidates
.
append
(
classTy
);
}
else
{
namedTy
=
ty
->
asNamedType
();
if
(
!
namedTy
)
{
...
...
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