diff options
author | Przemyslaw Gorszkowski <pgorszkowski@gmail.com> | 2013-01-29 13:18:08 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-01-29 14:01:11 +0100 |
commit | 7fcc52bf47e11f34b18ef4aaea0b70e5a545f96e (patch) | |
tree | add9fdde6e4fd0360a953f3188534cf6808f5590 /src/libs/cplusplus/LookupContext.cpp | |
parent | 8bb0134c50aaeda3484e93a6162d566fd83715d3 (diff) | |
download | qt-creator-7fcc52bf47e11f34b18ef4aaea0b70e5a545f96e.tar.gz |
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>
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r-- | src/libs/cplusplus/LookupContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 95399bc067..b73c22b657 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -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; } |