Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Use KisPortingUtils::setUtf8OnStream

Halla Rempta0d8607af84c
diff --git a/libs/widgetutils/xmlgui/kxmlguifactory.cpp b/libs/widgetutils/xmlgui/kxmlguifactory.cpp
index 4c788ec7bf..029d3c9256 100644
--- a/libs/widgetutils/xmlgui/kxmlguifactory.cpp
+++ b/libs/widgetutils/xmlgui/kxmlguifactory.cpp
@@ -34,6 +34,8 @@
#include <kis_icon_utils.h>
#include <WidgetUtilsDebug.h>
+#include <KisPortingUtils.h>
+
Q_DECLARE_METATYPE(QList<QKeySequence>)
using namespace KisKXMLGUI;
@@ -168,8 +170,9 @@ bool KisKXMLGUIFactory::saveConfigFile(const QDomDocument &doc,
}
// write out our document
+
QTextStream ts(&file);
- ts.setCodec(QTextCodec::codecForName("UTF-8"));
+ KisPortingUtils::setUtf8OnStream(ts);
ts << doc;
file.close();