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:
Przemyslaw Gorszkowski
2013-01-29 13:18:08 +01:00
committed by Nikolai Kosjar
parent 8bb0134c50
commit 7fcc52bf47
4 changed files with 101 additions and 0 deletions

View File

@@ -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;
}