Commit 21871959 authored by hjk's avatar hjk
Browse files

CPlusPlus: Remove unneeded utf-8 roundtrip.



Change-Id: Iae3dcba305bac8a632c1ae94586fd687509ed92d
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 42587157
......@@ -111,6 +111,7 @@ public:
Document::Ptr document,
Scope *scope);
// Returns UTF-8.
QByteArray preprocess(const QByteArray &utf8code) const;
/**
......
......@@ -566,11 +566,10 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
newDeclText[i] = QLatin1Char('\n');
}
newDeclText.append(QLatin1String("{}"));
const QString newDeclTextPreprocessed =
QString::fromUtf8(typeOfExpression.preprocess(newDeclText.toUtf8()));
const QByteArray newDeclTextPreprocessed = typeOfExpression.preprocess(newDeclText.toUtf8());
Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>"));
newDeclDoc->setUtf8Source(newDeclTextPreprocessed.toUtf8());
newDeclDoc->setUtf8Source(newDeclTextPreprocessed);
newDeclDoc->parse(Document::ParseDeclaration);
newDeclDoc->check();
......
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