CPlusPlus: Remove Rreprocessor::run overload for QStrings

The preprocessor operates on QByteArray, making it less
convenient to use strings helps preventing accidental
conversion roundtrips.

Change-Id: Ifb2068a8fed137c52b05f2979b99cbce3462151e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-08-01 09:13:46 +02:00
parent 960e99ecb1
commit 2361353289
5 changed files with 5 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ static void applyRefactorings(QTextDocument *textDocument, TextEditorWidget *edi
Environment env;
Preprocessor preprocess(nullptr, &env);
const QByteArray preprocessedSource
= preprocess.run(QLatin1String("<no-file>"), textDocument->toPlainText());
= preprocess.run(QLatin1String("<no-file>"), textDocument->toPlainText().toUtf8());
Document::Ptr cppDocument = Document::create(QLatin1String("<no-file>"));
cppDocument->setUtf8Source(preprocessedSource);