summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/LookupContext.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-05-17 16:56:22 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-05-18 09:24:14 +0200
commit1e1d8e450f3108c42fd2816d424d50a6fa6040b4 (patch)
treed87a01eda90f23711ef78ac31c56483559819dcc /src/libs/cplusplus/LookupContext.cpp
parent35c50dcbfc06bae9755a11e4dde3370826e49e24 (diff)
downloadqt-creator-1e1d8e450f3108c42fd2816d424d50a6fa6040b4.tar.gz
Use the Control created by CPlusPlus::CreateBindings.
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r--src/libs/cplusplus/LookupContext.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 879c27de7f..f5e6015947 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);
}