summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/snippets/textdocument-tables/mainwindow.cpp')
-rw-r--r--src/gui/doc/snippets/textdocument-tables/mainwindow.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
index bd976a8ce4..85e7fc109a 100644
--- a/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
@@ -202,10 +202,7 @@ bool MainWindow::writeXml(const QString &fileName)
QFile file(fileName);
if (file.open(QFile::WriteOnly)) {
- QTextStream textStream(&file);
- textStream.setCodec(QTextCodec::codecForName("UTF-8"));
-
- textStream << domDocument->toString(1).toUtf8();
+ file.write(domDocument->toString(1).toUtf8());
file.close();
return true;
}