From 469b6ef741d4a3d425eda36ed6e2db3e8a2778bd Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Fri, 14 May 2010 14:18:44 +0200
Subject: [PATCH] Get rid of useless overload of findType().

---
 src/libs/cplusplus/LookupContext.cpp | 19 +------------------
 src/libs/cplusplus/LookupContext.h   |  4 ----
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 7fea6918fb7..09465a2fee0 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -218,18 +218,7 @@ QList<Symbol *> LookupContext::lookup(const Name *name, Scope *scope) const
                 break; // it's a formal argument.
 
             if (fun->name() && fun->name()->isQualifiedNameId()) {
-                const QualifiedNameId *q = fun->name()->asQualifiedNameId();
-
-                QList<const Name *> path = fullyQualifiedName(scope->owner());
-
-                for (unsigned index = 0; index < q->nameCount() - 1; ++index) { // ### TODO remove me.
-                    const Name *name = q->nameAt(index);
-
-                    if (name->isNameId() || name->isTemplateNameId())
-                        path.append(name);
-                }
-
-                if (ClassOrNamespace *binding = bindings()->lookupType(path))
+                if (ClassOrNamespace *binding = bindings()->lookupType(fun))
                     return binding->lookup(name);
             }
 
@@ -647,12 +636,6 @@ ClassOrNamespace *CreateBindings::lookupType(Symbol *symbol)
     return b;
 }
 
-ClassOrNamespace *CreateBindings::lookupType(const QList<const Name *> &path)
-{
-    ClassOrNamespace *e = _globalNamespace->findType(path);
-    return e;
-}
-
 void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace)
 {
     ClassOrNamespace *previous = switchCurrentClassOrNamespace(classOrNamespace);
diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h
index b96ab2f84a6..7b0f69b4444 100644
--- a/src/libs/cplusplus/LookupContext.h
+++ b/src/libs/cplusplus/LookupContext.h
@@ -126,10 +126,6 @@ public:
     /// Finds the binding associated to the given symbol.
     ClassOrNamespace *lookupType(Symbol *symbol);
 
-    /// Find the binding with the given path.
-    /// \internal
-    ClassOrNamespace *lookupType(const QList<const Name *> &path);
-
     /// Returns the Control that must be used to create temporary symbols.
     /// \internal
     Control *control() const;
-- 
GitLab