forked from qt-creator/qt-creator
		
	C++: Accept UTF-8 byte arrays in type of expression
The model uses UTF-8 internally and it makes more sense to only convert when necessary. A following commit will rename the source/setSource methods in document for more clarity too. Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
		@@ -508,8 +508,7 @@ bool CheckSymbols::visit(MemberAccessAST *ast)
 | 
			
		||||
                const QByteArray expression = _doc->source().mid(start.begin(), end.end() - start.begin());
 | 
			
		||||
 | 
			
		||||
                const QList<LookupItem> candidates =
 | 
			
		||||
                    typeOfExpression(QLatin1String(expression), enclosingScope(),
 | 
			
		||||
                                                   TypeOfExpression::Preprocess);
 | 
			
		||||
                    typeOfExpression(expression, enclosingScope(), TypeOfExpression::Preprocess);
 | 
			
		||||
                addClassMember(candidates, ast->member_name);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -534,8 +533,8 @@ bool CheckSymbols::visit(CallAST *ast)
 | 
			
		||||
                    const QByteArray expression = textOf(access);
 | 
			
		||||
 | 
			
		||||
                    const QList<LookupItem> candidates =
 | 
			
		||||
                        typeOfExpression(QLatin1String(expression), enclosingScope(),
 | 
			
		||||
                                          TypeOfExpression::Preprocess);
 | 
			
		||||
                        typeOfExpression(expression, enclosingScope(),
 | 
			
		||||
                                         TypeOfExpression::Preprocess);
 | 
			
		||||
 | 
			
		||||
                    NameAST *memberName = access->member_name;
 | 
			
		||||
                    if (QualifiedNameAST *q = memberName->asQualifiedName())
 | 
			
		||||
@@ -552,7 +551,7 @@ bool CheckSymbols::visit(CallAST *ast)
 | 
			
		||||
                        exprName = q->unqualified_name;
 | 
			
		||||
 | 
			
		||||
                    const QList<LookupItem> candidates =
 | 
			
		||||
                        typeOfExpression(QLatin1String(textOf(idExpr)), enclosingScope(),
 | 
			
		||||
                        typeOfExpression(textOf(idExpr), enclosingScope(),
 | 
			
		||||
                                         TypeOfExpression::Preprocess);
 | 
			
		||||
                    addVirtualMethod(candidates, exprName, argumentCount);
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user