forked from qt-creator/qt-creator
CPlusPlus: Remove unneeded utf-8 roundtrip.
Change-Id: Iae3dcba305bac8a632c1ae94586fd687509ed92d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user