CPlusPlus: Remove unneeded utf-8 roundtrip.

Change-Id: Iae3dcba305bac8a632c1ae94586fd687509ed92d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
hjk
2013-10-06 03:18:07 +02:00
parent 4258715731
commit 2187195995
2 changed files with 3 additions and 3 deletions

View File

@@ -111,6 +111,7 @@ public:
Document::Ptr document, Document::Ptr document,
Scope *scope); Scope *scope);
// Returns UTF-8.
QByteArray preprocess(const QByteArray &utf8code) const; QByteArray preprocess(const QByteArray &utf8code) const;
/** /**

View File

@@ -566,11 +566,10 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
newDeclText[i] = QLatin1Char('\n'); newDeclText[i] = QLatin1Char('\n');
} }
newDeclText.append(QLatin1String("{}")); newDeclText.append(QLatin1String("{}"));
const QString newDeclTextPreprocessed = const QByteArray newDeclTextPreprocessed = typeOfExpression.preprocess(newDeclText.toUtf8());
QString::fromUtf8(typeOfExpression.preprocess(newDeclText.toUtf8()));
Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>")); Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>"));
newDeclDoc->setUtf8Source(newDeclTextPreprocessed.toUtf8()); newDeclDoc->setUtf8Source(newDeclTextPreprocessed);
newDeclDoc->parse(Document::ParseDeclaration); newDeclDoc->parse(Document::ParseDeclaration);
newDeclDoc->check(); newDeclDoc->check();