diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-14 14:37:17 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-14 14:37:17 +0200 |
commit | ca1d1259c60728be290dd4846f371a2bcff5fbf5 (patch) | |
tree | 3f70092350aeb3a70509256d494114c682c2660d /src/libs/cplusplus/LookupContext.cpp | |
parent | 469b6ef741d4a3d425eda36ed6e2db3e8a2778bd (diff) | |
download | qt-creator-ca1d1259c60728be290dd4846f371a2bcff5fbf5.tar.gz |
Cleanup.
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r-- | src/libs/cplusplus/LookupContext.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 09465a2fee..d1d8f386b9 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -341,15 +341,9 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding QSet<ClassOrNamespace *> *processed, const TemplateNameId *templateId) { - if (! binding) - return; - - else if (! processed->contains(binding)) { + if (binding && ! processed->contains(binding)) { processed->insert(binding); - //Overview oo; - //qDebug() << "search for:" << oo(name) << "template:" << oo(templateId) << "b:" << oo(binding->_templateId); - foreach (Symbol *s, binding->symbols()) { if (ScopedSymbol *scoped = s->asScopedSymbol()) _factory->lookupInScope(name, scoped->members(), result, templateId); @@ -360,8 +354,6 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding foreach (ClassOrNamespace *u, binding->usings()) lookup_helper(name, u, result, processed, binding->_templateId); - - //qDebug() << "=======" << oo(name) << "template:" << oo(binding->_templateId); } } @@ -444,21 +436,6 @@ ClassOrNamespace *ClassOrNamespace::findType(const Name *name) return lookupType_helper(name, &processed, /*searchInEnclosingScope =*/ false); } -ClassOrNamespace *ClassOrNamespace::findType(const QList<const Name *> &path) -{ - if (path.isEmpty()) - return globalNamespace(); - - ClassOrNamespace *e = this; - - for (int i = 0; e && i < path.size(); ++i) { - QSet<ClassOrNamespace *> processed; - e = e->lookupType_helper(path.at(i), &processed, /*searchInEnclosingScope =*/ false); - } - - return e; -} - ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name, QSet<ClassOrNamespace *> *processed, bool searchInEnclosingScope) |