diff --git a/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp b/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp index f2493b10cac..c3b6f4ac3ef 100644 --- a/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp +++ b/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp @@ -126,7 +126,7 @@ bool FixitsRefactoringFile::apply() QString error; for (auto it = m_documents.begin(); it != m_documents.end(); ++it) { - if (!m_textFileFormat.writeFile(it.key(), it.value()->toRawText(), &error)) { + if (!m_textFileFormat.writeFile(it.key(), it.value()->toPlainText(), &error)) { qCDebug(fixitsLog) << "ERROR: Could not write file" << it.key() << ":" << error; return false; // Error writing file } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp index 80ee8ffeedd..e0a06c824e5 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp @@ -117,7 +117,7 @@ bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *fi block = block.next(); } } - file->setContents(doc.toRawText()); + file->setContents(doc.toPlainText()); return true; } diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index 6f44a829bf3..5dab7bbf997 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -277,7 +277,7 @@ void ProjectFileWizardExtension::applyCodeStyle(GeneratedFile *file) const block = block.next(); } } - file->setContents(doc.toRawText()); + file->setContents(doc.toPlainText()); } } // namespace Internal diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index ad4bc44243f..1d43972e68d 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -97,7 +97,7 @@ bool RefactoringChanges::createFile(const QString &fileName, const QString &cont TextFileFormat format; format.codec = EditorManager::defaultTextCodec(); QString error; - bool saveOk = format.writeFile(fileName, document->toRawText(), &error); + bool saveOk = format.writeFile(fileName, document->toPlainText(), &error); delete document; if (!saveOk) return false; @@ -367,7 +367,7 @@ bool RefactoringFile::apply() QString error; // suppress "file has changed" warnings if the file is open in a read-only editor Core::FileChangeBlocker block(m_fileName); - if (!m_textFileFormat.writeFile(m_fileName, doc->toRawText(), &error)) { + if (!m_textFileFormat.writeFile(m_fileName, doc->toPlainText(), &error)) { qWarning() << "Could not apply changes to" << m_fileName << ". Error: " << error; result = false; } diff --git a/src/plugins/texteditor/textdocument.cpp b/src/plugins/texteditor/textdocument.cpp index bfd709d5fef..2bfb51439a1 100644 --- a/src/plugins/texteditor/textdocument.cpp +++ b/src/plugins/texteditor/textdocument.cpp @@ -569,7 +569,7 @@ bool TextDocument::save(QString *errorString, const QString &saveFileName, bool } } - const bool ok = write(fName, saveFormat, d->m_document.toRawText(), errorString); + const bool ok = write(fName, saveFormat, d->m_document.toPlainText(), errorString); // restore text cursor and scroll bar positions if (autoSave && undos < d->m_document.availableUndoSteps()) {