forked from qt-creator/qt-creator
C++ editor: Highlighting static variables
Fix highlighting, find usages, marking for static variables. Task-number: QTCREATORBUG-6822 Change-Id: I0c97c93c6c1024550907eec3820496df22a94e85 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
8bb0134c50
commit
7fcc52bf47
@@ -335,6 +335,10 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
|
||||
if (ClassOrNamespace *binding = bindings()->lookupType(fun)) {
|
||||
candidates = binding->find(name);
|
||||
|
||||
// try find this name in parent class
|
||||
while (candidates.isEmpty() && (binding = binding->parent()))
|
||||
candidates = binding->find(name);
|
||||
|
||||
if (! candidates.isEmpty())
|
||||
return candidates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user