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
...@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression) ...@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression)
{ {
// create the expression's AST. // create the expression's AST.
Document::Ptr doc = Document::create(QLatin1String("<completion>")); Document::Ptr doc = Document::create(QLatin1String("<completion>"));
doc->setSource(expression.toUtf8()); const QByteArray bytes = expression.toUtf8();
doc->parse(Document::ParseExpression); doc->parse(Document::ParseExpression);
return doc; return doc;
} }
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