diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 879c27de7f94d4fdff8b9ce660c70e6c452f7d50..f5e6015947443a6e3ede1ea515dbbbca5c35f0ba 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -90,7 +90,6 @@ bool ClassOrNamespace::CompareName::operator()(const Name *name, const Name *oth // LookupContext ///////////////////////////////////////////////////////////////////// LookupContext::LookupContext() - : _control(0) { } LookupContext::LookupContext(Document::Ptr thisDocument, @@ -99,7 +98,6 @@ LookupContext::LookupContext(Document::Ptr thisDocument, _thisDocument(thisDocument), _snapshot(snapshot) { - _control = _expressionDocument->control(); } LookupContext::LookupContext(Document::Ptr expressionDocument, @@ -109,12 +107,10 @@ LookupContext::LookupContext(Document::Ptr expressionDocument, _thisDocument(thisDocument), _snapshot(snapshot) { - _control = _expressionDocument->control(); } LookupContext::LookupContext(const LookupContext &other) - : _control(other._control), - _expressionDocument(other._expressionDocument), + : _expressionDocument(other._expressionDocument), _thisDocument(other._thisDocument), _snapshot(other._snapshot), _bindings(other._bindings) @@ -122,7 +118,6 @@ LookupContext::LookupContext(const LookupContext &other) LookupContext &LookupContext::operator = (const LookupContext &other) { - _control = other._control; _expressionDocument = other._expressionDocument; _thisDocument = other._thisDocument; _snapshot = other._snapshot; @@ -150,11 +145,8 @@ void LookupContext::setBindings(QSharedPointer<CreateBindings> bindings) _bindings = bindings; } -bool LookupContext::isValid() const -{ return _control != 0; } - Control *LookupContext::control() const -{ return _control; } +{ return bindings()->control(); } Document::Ptr LookupContext::expressionDocument() const { return _expressionDocument; } @@ -391,6 +383,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope, else if (s->name()->isQualifiedNameId()) continue; // skip qualified ids. +#if 0 if (templateId && (s->isDeclaration() || s->isFunction())) { FullySpecifiedType ty = GenTemplateInstance::instantiate(templateId, s, _control); @@ -415,6 +408,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope, continue; } } +#endif result->append(s); } diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h index 20829d9bb205024992f016820f4549c78d5d4354..060d7ab0066ddeb50c9054d238974d1b1789ce6d 100644 --- a/src/libs/cplusplus/LookupContext.h +++ b/src/libs/cplusplus/LookupContext.h @@ -204,8 +204,6 @@ public: LookupContext(const LookupContext &other); LookupContext &operator = (const LookupContext &other); - bool isValid() const; - Document::Ptr expressionDocument() const; Document::Ptr thisDocument() const; Document::Ptr document(const QString &fileName) const; @@ -228,8 +226,6 @@ public: static QList<const Name *> fullyQualifiedName(Symbol *symbol); private: - Control *_control; - // The current expression. Document::Ptr _expressionDocument;