summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppextractimages.cpp
diff options
context:
space:
mode:
authorNick Shaforostoff <shaforostoff@gmail.com>2016-04-13 00:47:50 +0300
committerUlf Hermann <ulf.hermann@qt.io>2016-08-26 07:39:53 +0000
commit8adad2fe09b173ff876895c27884f49804a20bcc (patch)
tree97cc19e256e08e8c958cb1b60860e153a8f18685 /src/tools/uic/cpp/cppextractimages.cpp
parent15c39dfe3db5c4264b49cb53e80ec088ea4948e9 (diff)
fix build with various QT_NO_* defines
Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppextractimages.cpp')
-rw-r--r--src/tools/uic/cpp/cppextractimages.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/uic/cpp/cppextractimages.cpp b/src/tools/uic/cpp/cppextractimages.cpp
index 22abd54283..6c8e1c0d8c 100644
--- a/src/tools/uic/cpp/cppextractimages.cpp
+++ b/src/tools/uic/cpp/cppextractimages.cpp
@@ -77,7 +77,9 @@ void ExtractImages::acceptUI(DomUI *node)
m_imagesDir = dir;
m_output = new QTextStream(&f);
+#ifndef QT_NO_TEXTCODEC
m_output->setCodec(QTextCodec::codecForName("UTF-8"));
+#endif
QTextStream &out = *m_output;
@@ -121,7 +123,9 @@ void ExtractImages::acceptImage(DomImage *image)
if (isXPM_GZ) {
QTextStream *imageOut = new QTextStream(&f);
+#ifndef QT_NO_TEXTCODEC
imageOut->setCodec(QTextCodec::codecForName("UTF-8"));
+#endif
CPP::WriteIconData::writeImage(*imageOut, QString(), m_option.limitXPM_LineLength, image);
delete imageOut;