diff options
author | Przemyslaw Gorszkowski <pgorszkowski@gmail.com> | 2012-11-21 09:56:31 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2012-11-22 16:39:15 +0100 |
commit | 56966f3712b9ec2d790b7185d230d3193f261a62 (patch) | |
tree | 20f0e624a739c8927c689a9155e52438c61713c6 /src/libs/cplusplus/LookupContext.cpp | |
parent | adc8dc7bfb2ed8bc1d28cbbcb5e0a67f18fc6f2b (diff) | |
download | qt-creator-56966f3712b9ec2d790b7185d230d3193f261a62.tar.gz |
C++: Fix code completion for Qt containers
This change solves only problem with Qt containers.
stl containers need separate change.
Problem was with predeclaration of template class after
declaration of this template class.
(there is unit test added which shows the problem).
Task-number: QTCREATORBUG-8228 (cover only Qt containers)
Change-Id: If1f76c88c955b7b55347d302b353f5cd52b244a4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Conflicts:
src/plugins/cpptools/cppcompletion_test.cpp
Change-Id: I9f665276926f2e440ad0c92e94dd1aeee89005b3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r-- | src/libs/cplusplus/LookupContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index c2c7b5c599..4f56c5180a 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -730,7 +730,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac return reference; const TemplateNameId *templId = name->asTemplateNameId(); - if (_alreadyConsideredClasses.contains(referenceClass) || + if ((! templId && _alreadyConsideredClasses.contains(referenceClass)) || (templId && _alreadyConsideredTemplates.contains(templId))) { return reference; |