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
fc1006e2
Commit
fc1006e2
authored
Aug 03, 2010
by
Roberto Raggi
Browse files
Highlight only the unqualified name id.
parent
0c2e8834
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppchecksymbols.cpp
View file @
fc1006e2
...
...
@@ -464,17 +464,26 @@ bool CheckSymbols::visit(CallAST *ast)
const
QByteArray
expression
=
textOf
(
access
);
const
QList
<
LookupItem
>
candidates
=
typeOfExpression
(
expression
,
scope
,
TypeOfExpression
::
Preprocess
);
addVirtualMethodUsage
(
candidates
,
access
->
member_name
,
argumentCount
);
NameAST
*
memberName
=
access
->
member_name
;
if
(
QualifiedNameAST
*
q
=
memberName
->
asQualifiedName
())
memberName
=
q
->
unqualified_name
;
addVirtualMethodUsage
(
candidates
,
memberName
,
argumentCount
);
}
}
}
else
if
(
IdExpressionAST
*
idExpr
=
ast
->
base_expression
->
asIdExpression
())
{
if
(
const
Name
*
name
=
idExpr
->
name
->
name
)
{
if
(
maybeVirtualMethod
(
name
))
{
NameAST
*
exprName
=
idExpr
->
name
;
if
(
QualifiedNameAST
*
q
=
exprName
->
asQualifiedName
())
exprName
=
q
->
unqualified_name
;
Scope
*
scope
=
findScope
(
idExpr
);
const
QByteArray
expression
=
textOf
(
idExpr
);
const
QList
<
LookupItem
>
candidates
=
typeOfExpression
(
expression
,
scope
,
TypeOfExpression
::
Preprocess
);
addVirtualMethodUsage
(
candidates
,
idExpr
->
n
ame
,
argumentCount
);
addVirtualMethodUsage
(
candidates
,
exprN
ame
,
argumentCount
);
}
}
}
...
...
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