Commit 180233e7 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixes: Do not activate member completion when class names are used as base of...

Fixes: Do not activate member completion when class names are used as base of a DOT or ARROW expression.
parent 5433c853
......@@ -599,7 +599,9 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
ty = refTy->elementType();
if (Class *classTy = ty->asClass()) {
classObjectCandidates.append(classTy);
Symbol *symbol = result.second;
if (symbol && ! symbol->isClass())
classObjectCandidates.append(classTy);
} else if (NamedType *namedTy = ty->asNamedType()) {
// ### This code is pretty slow.
const QList<Symbol *> candidates = context.resolve(namedTy->name());
......@@ -700,7 +702,9 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
namedTy = ptrTy->elementType()->asNamedType();
}
} else if (Class *classTy = ty->asClass()) {
classObjectCandidates.append(classTy);
Symbol *symbol = result.second;
if (symbol && ! symbol->isClass())
classObjectCandidates.append(classTy);
} else {
namedTy = ty->asNamedType();
if (! namedTy) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment