Keep the original encoded text around while preprocessing.

This commit is contained in:
Roberto Raggi
2009-06-15 15:38:20 +02:00
parent dbba0ff8d7
commit e2a0a4d7c5
12 changed files with 67 additions and 46 deletions

View File

@@ -495,7 +495,7 @@ void CPPEditor::reformatDocument()
QByteArray source = toPlainText().toUtf8();
Control control;
StringLiteral *fileId = control.findOrInsertFileName("<file>");
StringLiteral *fileId = control.findOrInsertStringLiteral("<file>");
TranslationUnit unit(&control, fileId);
unit.setQtMocRunEnabled(true);
unit.setSource(source.constData(), source.length());