Skip to content
Snippets Groups Projects
Commit e02f818f authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Save the utf8 bytes in a QByteArray before invoking the parser.

parent 2a76e5f8
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression)
{
// create the expression's AST.
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
doc->setSource(expression.toUtf8());
const QByteArray bytes = expression.toUtf8();
doc->setSource(bytes);
doc->parse(Document::ParseExpression);
return doc;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment