diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-10 12:19:13 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-10 12:19:47 +0200 |
commit | 139087ee5c262937c6476fadd26955e4f9a5ad10 (patch) | |
tree | 6a1cfd24ac86c7708116f2237ef16907cb7cd551 /src/plugins/cpptools/cppcodecompletion.cpp | |
parent | 9a51f684ee23404c17fec92cf6d869c1030d3a64 (diff) | |
download | qt-creator-139087ee5c262937c6476fadd26955e4f9a5ad10.tar.gz |
Introduced Symbol::copy(otherSymbol) and removed some deprecated code.
Diffstat (limited to 'src/plugins/cpptools/cppcodecompletion.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodecompletion.cpp | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 198ff12cca..4edf109624 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -1115,7 +1115,7 @@ bool CppCodeCompletion::completeMember(const QList<LookupItem> &baseResults, classObjectCandidates.append(klass); else if (NamedType *namedTy = ty->asNamedType()) { - if (ClassOrNamespace *b = context.classOrNamespace(namedTy->name(), r.lastVisibleSymbol()->scope())) { + if (ClassOrNamespace *b = context.classOrNamespace(namedTy->name(), r.lastVisibleSymbol())) { classOrNamespace = b; break; @@ -1342,22 +1342,6 @@ void CppCodeCompletion::completeNamespace(ClassOrNamespace *b, const LookupConte } } -void CppCodeCompletion::completeNamespace(const QList<Symbol *> &candidates, - const DeprecatedLookupContext &deprecatedContext) -{ - if (candidates.isEmpty()) - return; - - else if (Namespace *ns = candidates.first()->asNamespace()) { - LookupContext context(deprecatedContext.expressionDocument(), - deprecatedContext.thisDocument(), - deprecatedContext.snapshot()); - - if (ClassOrNamespace *binding = context.classOrNamespace(ns)) - completeNamespace(binding, context); - } -} - void CppCodeCompletion::completeClass(ClassOrNamespace *b, const LookupContext &, bool staticLookup) { QSet<ClassOrNamespace *> bindingsVisited; @@ -1405,23 +1389,6 @@ void CppCodeCompletion::completeClass(ClassOrNamespace *b, const LookupContext & } } -void CppCodeCompletion::completeClass(const QList<Symbol *> &candidates, - const DeprecatedLookupContext &deprecatedContext, - bool staticLookup) -{ - if (candidates.isEmpty()) - return; - - else if (Symbol *klass = candidates.first()) { - LookupContext context(deprecatedContext.expressionDocument(), - deprecatedContext.thisDocument(), - deprecatedContext.snapshot()); - - if (ClassOrNamespace *binding = context.classOrNamespace(klass)) - completeClass(binding, context, staticLookup); - } -} - bool CppCodeCompletion::completeQtMethod(const QList<LookupItem> &results, const LookupContext &newContext, bool wantSignals) |