forked from qt-creator/qt-creator
C++: Accept UTF-8 byte arrays in type of expression
The model uses UTF-8 internally and it makes more sense to only convert when necessary. A following commit will rename the source/setSource methods in document for more clarity too. Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -575,7 +575,8 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
|
||||
newDeclText[i] = QLatin1Char('\n');
|
||||
}
|
||||
newDeclText.append(QLatin1String("{}"));
|
||||
const QString newDeclTextPreprocessed = typeOfExpression.preprocess(newDeclText);
|
||||
const QString newDeclTextPreprocessed =
|
||||
QString::fromUtf8(typeOfExpression.preprocess(newDeclText.toUtf8()));
|
||||
|
||||
Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>"));
|
||||
newDeclDoc->setSource(newDeclTextPreprocessed.toUtf8());
|
||||
|
||||
Reference in New Issue
Block a user