From 67c66c4ea4fbc11ee5547095117ef8930b3ab950 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 7 Sep 2018 15:01:07 +0200 Subject: [PATCH 1/9] windows: Give up on SwitchableComposition Opt out of switching between the normal and OpenGL based flush paths. Once a QOpenGLWidget or QQuickWidget becomes visible in a window, the window contents will be composed using OpenGL from that point on, even if said widgets become invisible afterwards. Now that Qt Creator does not rely on QQuickWidget the issue is less burning anyways. Task-number: QTBUG-68329 Change-Id: I177e6e6094ee06ea26d8d0343bd3d84aadfa5913 Reviewed-by: Friedemann Kleint Reviewed-by: Allan Sandfeld Jensen --- .../platforms/windows/qwindowsintegration.cpp | 2 +- src/widgets/kernel/qwidgetbackingstore.cpp | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 0a9e8b9d91d..66a5c52da5e 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -300,7 +300,7 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co case AllGLFunctionsQueryable: return true; case SwitchableWidgetComposition: - return true; + return false; // QTBUG-68329 QTBUG-53515 QTBUG-54734 default: return QPlatformIntegration::hasCapability(cap); } diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 3b093283cdb..96a64f12c79 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -1000,20 +1000,8 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) static bool switchableWidgetComposition = QGuiApplicationPrivate::instance()->platformIntegration() ->hasCapability(QPlatformIntegration::SwitchableWidgetComposition); - if (!switchableWidgetComposition -// The Windows compositor handles fullscreen OpenGL window specially. Besides -// having trouble with popups, it also has issues with flip-flopping between -// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen -// windows (QTBUG-53515). Similary, translucent windows should not switch to -// layered native windows (QTBUG-54734). -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) - || tlw->windowState().testFlag(Qt::WindowFullScreen) - || tlw->testAttribute(Qt::WA_TranslucentBackground) -#endif - ) - { + if (!switchableWidgetComposition) return qt_dummy_platformTextureList(); - } } return 0; From 033cc3403a8238d1b6d56c42e9e9be4fba1069dc Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 19 Oct 2018 12:41:58 +0300 Subject: [PATCH 2/9] mkspecs: use cross compile tools with LTCG AR and NM have different tools when LTCG is used, override those also when cross compiling. Fixes: QTBUG-71595 Change-Id: I5347bd1874688dd89395c50ff6dd08fb1c0ebab1 Reviewed-by: Oswald Buddenhagen --- mkspecs/devices/common/linux_device_pre.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkspecs/devices/common/linux_device_pre.conf b/mkspecs/devices/common/linux_device_pre.conf index 8c6c87d0b79..5b6a9bfcfa1 100644 --- a/mkspecs/devices/common/linux_device_pre.conf +++ b/mkspecs/devices/common/linux_device_pre.conf @@ -24,5 +24,9 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_STRIP = $${CROSS_COMPILE}strip +# modifications to gcc-base.conf +QMAKE_AR_LTCG = $${CROSS_COMPILE}gcc-ar cqs +QMAKE_NM_LTCG = $${CROSS_COMPILE}gcc-nm -P + contains(DISTRO_OPTS, deb-multi-arch): \ QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config From 9f2216667a96c2de94b28e4fd2891b6d3b938cb9 Mon Sep 17 00:00:00 2001 From: Andrew Smolko Date: Tue, 6 Nov 2018 11:20:34 +0300 Subject: [PATCH 3/9] Fix memory copy in QGIFFormat::disposePrevious() Fix invalid destination address in memcpy operation when RestoreImage disposal method is used. Task-number: QTBUG-71599 Change-Id: Ib74a044c0e45250ff708268c463f831ee54933e6 Reviewed-by: Eirik Aavitsland --- src/plugins/imageformats/gif/qgifhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index ebe5964664f..1aef1a24d2b 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -213,7 +213,7 @@ void QGIFFormat::disposePrevious(QImage *image) case RestoreImage: { if (frame >= 0) { for (int ln=t; ln<=b; ln++) { - memcpy(image->scanLine(ln)+l, + memcpy(image->scanLine(ln)+l*sizeof(QRgb), backingstore.constScanLine(ln-t), (r-l+1)*sizeof(QRgb)); } @@ -426,7 +426,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, unsigned char *dest_data = backingstore.bits(); for (int ln=0; ln Date: Mon, 8 Oct 2018 12:19:01 -0700 Subject: [PATCH 4/9] Update the floppy disk icon (save) to be physically correct [ChangeLog][Documentation] Fixed the icons for the "file save" action that were inaccurate representations of a 3.5-inch floppy disk (the cut edge was on the wrong side). Now all floppy representations are physically accurate. Change-Id: Ia3b27ae12a1a4fefa3b7fffd155bb86fee5271c3 Fixes: QTBUG-71012 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- .../mainwindows/application/images/save.png | Bin 1187 -> 2699 bytes .../widgets/mainwindows/mdi/images/save.png | Bin 1187 -> 2699 bytes .../widgets/mainwindows/sdi/images/save.png | Bin 1187 -> 2699 bytes .../textedit/images/mac/exportpdf.png | Bin 1215 -> 12637 bytes .../richtext/textedit/images/mac/filesave.png | Bin 1206 -> 2699 bytes .../textedit/images/win/exportpdf.png | Bin 1059 -> 1215 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/widgets/mainwindows/application/images/save.png b/examples/widgets/mainwindows/application/images/save.png index daba865fafd22fa18e7c0488eb699b79d3554170..e65a29d5f1735d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(Ec|J0oQTx z^MzH6AMsRuxR=J;y1KikY#D~3L<|C8@aher6t7*cVC%1H5*o<;^f~w~q8vk4bobM` zNtMxL=WKf*14_Y&(3*hGV1l(eK~iWF&sN~0=cP& z4-*2tdZvpj*2f=xfSsKk)M_=fTCD`2Mb$ADPE_t0G|#EnQ_=D1aEj&gFTPSXS=h%A z1~?B4OlEV*{}&e*v9z?L9B=`eot>pBId^Cl*p`TLppyZk6F{7V4rOlKip3(G<#bQT z<&+c(g(1~hc7(x67AC}yLZrhW)TtLYmyTIJ8Dom$zF+HFrP7x@cgdX$AVSC>4j4I@ zJlx;)?ufRmj1IX0mGD5>?uqx_8s9DWF5uIRiKQU z25$Ym-5NbgsDi-@lIk0gSG! UB0_&5sQ>@~07*qoM6N<$f^ZKn4*&oF diff --git a/examples/widgets/richtext/textedit/images/win/exportpdf.png b/examples/widgets/richtext/textedit/images/win/exportpdf.png index eef5132928be462a4aa01552c3ea09312dc6ee12..ebb44e6b8829fd968aa7cca386f21577f5635711 100644 GIT binary patch literal 1215 zcmV;w1VHPQF`lm8y1`8}?eeOibRVJIa zx;(rshVT1KOiXh5;?#RULjb<{HpB4f8B(b=T)ANJ#=d80g^u=r&y}Lbzz-Qx=?*qO zun~ZU0Jde*-ku`8rUTb>iO1u#LS6UWLt<4ypO_j0VEF(sCywhTNFh5vgVl*@_|6pK(&=(YrvGON=oF&&e~9)F7QvGdIX7^b1H6ej9` z?c1Nk+O-S0b}dMW$mIxj>>${)r{3@TI-I|EFLZUO{@r0eg#8B(a^l1p?HPKD<^cjf zQ26+sBJlJQ`0edjM~)(p$hlekH+ymR?ZZ?3_R%9qK%N}J{OAD2$DinWTh&Ve0sx7p zyiDaAXkI3rGYAi9kR$%lz)$ zy3R1D*=|{OGnPwO&nP54c8XTfn6gB_m z0T2SAF<8I81KYM~fwb4ySWf#QB4}FozBu z(#N+U?WH^w`YMYGP~U{E>r&Im$Ox%aigY@y86F-cN>WPdLVMLtOhjLXwPg@USuac^ z68gzlonqZas9}(>UQ+Fim;tH@7emxd>YFDtzx}I2fgY~PDBh=qfNApHBybnVEtGSgDgmlF?QjuZcTSCx@)?q z#F#d-ZdlkRWh17zfT(F3Eu|Hzduh@iDWYrQ7SlK}v8Lqm+6KFw>FFH@MBVx+g1 zcv~BX`}+YH>FcAkv{ZILFh+X-*6oncYgBv|P9_-{v66rMcN00L8)-CFe9ATud4`bV&eUS=4f;$M2o69kO{d#4* zI6O?_i4)`|CYZc*iBK|$D7CJ!2wG{h(p6Ts1vtyg+#eXIjHfagrZSnz_|Ca=)k#zd zkpisk0hZ6l<9G_kAHpYQM;W>rs=*G|U{y2-JOKct-s$E_YZ|RRfEa@ah^)Vj2x0_d z1o8U`HXTGM7(@(OdqM_-0mKMcf^rQ?DTL4# zfDJpkeRG`JkmjS~2k}{g5rZ)Xr8Gusl-4L$G5=_l+jADRsd^s#JwqfK#&y-!l`Q3A z(b}aZ7Nt2Uyp*ovhk+lt`qMQ;;LESR;Q5Yr9LK>aDVh>~#up5S4mC6L?*gu?a9veZ zXo1a{V2pU@iZR%BiMhFX?oHeW;NkK^3i&*a<4`JbWI z7-NXVVq~)`72~U`Hrk}tE7^5XuB!IHvMdX*IzITWe{}S(!Tn9CL?IR+5;QD4c6qkr z6hCxMXby#|ct$432_iJWNm=QppI>fM#DTq-r9;Nz1bQfU$rG&z`vo+t=(TaRecA@ dS$qB4@*jxcBlgPF?Z*HB002ovPDHLkV1i~?^WXpg From 825f98815683faea06144ab0262129b0367798ee Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 2 Oct 2018 12:59:24 +0200 Subject: [PATCH 5/9] Modernize the "textcodec" feature Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne Reviewed-by: Oswald Buddenhagen --- qmake/Makefile.unix | 6 +- qmake/Makefile.win32 | 1 - qmake/library/qmakevfs.cpp | 8 +- qmake/library/qmakevfs.h | 6 +- qmake/qmake.pro | 2 - src/corelib/codecs/codecs.pri | 88 ++++++++++--------- src/corelib/codecs/qiconvcodec.cpp | 2 - src/corelib/codecs/qicucodec.cpp | 4 - src/corelib/codecs/qicucodec_p.h | 6 +- src/corelib/codecs/qlatincodec.cpp | 4 - src/corelib/codecs/qlatincodec_p.h | 6 +- src/corelib/codecs/qsimplecodec.cpp | 4 - src/corelib/codecs/qsimplecodec_p.h | 6 +- src/corelib/codecs/qtextcodec.cpp | 5 +- src/corelib/codecs/qtextcodec.h | 7 +- src/corelib/codecs/qtextcodec_p.h | 9 +- src/corelib/codecs/qutfcodec.cpp | 4 +- src/corelib/codecs/qutfcodec_p.h | 10 ++- src/corelib/codecs/qwindowscodec_p.h | 2 + src/corelib/global/qconfig-bootstrapped.h | 1 - src/corelib/global/qt_pch.h | 2 + src/corelib/io/qsettings.cpp | 12 +-- src/corelib/io/qsettings.h | 2 +- src/corelib/kernel/qcoreapplication.cpp | 1 - src/corelib/kernel/qcoreglobaldata.cpp | 2 + src/corelib/kernel/qcoreglobaldata_p.h | 2 + src/corelib/kernel/qmimedata.cpp | 6 +- src/corelib/serialization/qtextstream.cpp | 24 ++--- src/corelib/serialization/qtextstream.h | 2 +- src/corelib/serialization/qtextstream_p.h | 6 +- src/corelib/serialization/qxmlstream.cpp | 42 ++++----- src/corelib/serialization/qxmlstream.g | 4 +- src/corelib/serialization/qxmlstream.h | 2 +- src/corelib/serialization/qxmlstream_p.h | 4 +- src/corelib/tools/qstring.cpp | 10 +-- src/corelib/tools/qstringbuilder.cpp | 1 - src/gui/image/qpnghandler.cpp | 1 - src/gui/kernel/qclipboard.cpp | 8 +- src/gui/kernel/qsimpledrag.cpp | 1 - src/gui/kernel/qt_gui_pch.h | 2 + src/gui/text/qtextdocument.cpp | 4 +- src/gui/text/qtextdocument.h | 2 +- src/gui/text/qtextdocumentfragment.cpp | 1 - src/gui/text/qtextdocumentwriter.cpp | 16 ++-- src/gui/text/qtextdocumentwriter.h | 2 +- src/gui/text/qtexthtmlparser.cpp | 1 - src/gui/text/qtextodfwriter.cpp | 2 +- src/platformsupport/clipboard/qmacmime.mm | 4 + .../input/libinput/qlibinputkeyboard.cpp | 4 +- .../platforms/cocoa/qcocoafiledialoghelper.mm | 1 - .../platforms/cocoa/qpaintengine_mac.mm | 1 - src/plugins/platforms/xcb/qxcbmime.cpp | 2 +- src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 20 +++-- src/tools/uic/main.cpp | 2 +- src/widgets/kernel/qapplication.cpp | 1 - src/widgets/kernel/qt_widgets_pch.h | 2 + src/widgets/widgets/qtextbrowser.cpp | 4 +- src/xml/dom/qdom.cpp | 10 ++- src/xml/sax/qxml.cpp | 14 +-- 59 files changed, 206 insertions(+), 202 deletions(-) diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 426387f0c21..e9f8c48651f 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -17,7 +17,7 @@ OBJS = \ #qt code (please keep in order matching DEPEND_SRC) QOBJS = \ - qtextcodec.o qutfcodec.o \ + qutfcodec.o \ qglobal.o qlogging.o qmalloc.o qnumeric.o qoperatingsystemversion.o qrandom.o \ qabstractfileengine.o qbuffer.o qdatastream.o qdebug.o \ qdir.o qdiriterator.o \ @@ -66,7 +66,6 @@ DEPEND_SRC = \ $(QMKGENSRC)/win32/msvc_vcxproj.cpp \ $(QMKGENSRC)/win32/winmakefile.cpp \ $(QMKGENSRC)/xmloutput.cpp \ - $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp \ $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \ $(SOURCE_PATH)/src/corelib/global/qglobal.cpp \ $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp \ @@ -337,9 +336,6 @@ qcore_foundation.o: $(SOURCE_PATH)/src/corelib/kernel/qcore_foundation.mm qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< -qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $< - qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 52923321876..6234616c2df 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -99,7 +99,6 @@ QTOBJS= \ qoperatingsystemversion.obj \ qoperatingsystemversion_win.obj \ qregexp.obj \ - qtextcodec.obj \ qutfcodec.obj \ qstring.obj \ qstring_compat.obj \ diff --git a/qmake/library/qmakevfs.cpp b/qmake/library/qmakevfs.cpp index 2239a2beec6..265f1e60d3e 100644 --- a/qmake/library/qmakevfs.cpp +++ b/qmake/library/qmakevfs.cpp @@ -35,7 +35,7 @@ using namespace QMakeInternal; #include #include -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) #include #endif @@ -49,7 +49,7 @@ QMakeVfs::QMakeVfs() , m_magicExisting(fL1S("existing")) #endif { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) m_textCodec = 0; #endif } @@ -219,7 +219,7 @@ QMakeVfs::ReadResult QMakeVfs::readFile(int id, QString *contents, QString *errS return ReadOtherError; } *contents = -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) m_textCodec ? m_textCodec->toUnicode(bcont) : #endif QString::fromLocal8Bit(bcont); @@ -273,7 +273,7 @@ void QMakeVfs::invalidateContents() } #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void QMakeVfs::setTextCodec(const QTextCodec *textCodec) { m_textCodec = textCodec; diff --git a/qmake/library/qmakevfs.h b/qmake/library/qmakevfs.h index 12172254714..7d4f9bb8901 100644 --- a/qmake/library/qmakevfs.h +++ b/qmake/library/qmakevfs.h @@ -38,7 +38,7 @@ # include #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QT_FORWARD_DECLARE_CLASS(QTextCodec) #endif @@ -89,7 +89,7 @@ public: void invalidateContents(); #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setTextCodec(const QTextCodec *textCodec); #endif @@ -125,7 +125,7 @@ private: QString m_magicMissing; QString m_magicExisting; #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) const QTextCodec *m_textCodec; #endif }; diff --git a/qmake/qmake.pro b/qmake/qmake.pro index 7c3ce3ef898..ebd61751b7d 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -152,7 +152,6 @@ SOURCES += \ qstringlist.cpp \ qsystemerror.cpp \ qtemporaryfile.cpp \ - qtextcodec.cpp \ qtextstream.cpp \ qutfcodec.cpp \ quuid.cpp \ @@ -204,7 +203,6 @@ HEADERS += \ qstringmatcher.h \ qsystemerror_p.h \ qtemporaryfile.h \ - qtextcodec.h \ qtextstream.h \ qutfcodec.h \ quuid.h \ diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri index d86d446c724..f1bbde1d694 100644 --- a/src/corelib/codecs/codecs.pri +++ b/src/corelib/codecs/codecs.pri @@ -1,62 +1,68 @@ # Qt core library codecs module HEADERS += \ - codecs/qlatincodec_p.h \ - codecs/qsimplecodec_p.h \ codecs/qtextcodec_p.h \ - codecs/qtextcodec.h \ codecs/qutfcodec_p.h SOURCES += \ - codecs/qlatincodec.cpp \ - codecs/qsimplecodec.cpp \ - codecs/qtextcodec.cpp \ codecs/qutfcodec.cpp -qtConfig(codecs) { +qtConfig(textcodec) { HEADERS += \ - codecs/qisciicodec_p.h \ - codecs/qtsciicodec_p.h + codecs/qlatincodec_p.h \ + codecs/qsimplecodec_p.h \ + codecs/qtextcodec.h SOURCES += \ - codecs/qisciicodec.cpp \ - codecs/qtsciicodec.cpp -} + codecs/qlatincodec.cpp \ + codecs/qsimplecodec.cpp \ + codecs/qtextcodec.cpp -qtConfig(icu) { - HEADERS += \ - codecs/qicucodec_p.h - SOURCES += \ - codecs/qicucodec.cpp -} else { - qtConfig(big_codecs) { + qtConfig(codecs) { HEADERS += \ - codecs/qgb18030codec_p.h \ - codecs/qeucjpcodec_p.h \ - codecs/qjiscodec_p.h \ - codecs/qsjiscodec_p.h \ - codecs/qeuckrcodec_p.h \ - codecs/qbig5codec_p.h + codecs/qisciicodec_p.h \ + codecs/qtsciicodec_p.h SOURCES += \ - codecs/qgb18030codec.cpp \ - codecs/qjpunicode.cpp \ - codecs/qeucjpcodec.cpp \ - codecs/qjiscodec.cpp \ - codecs/qsjiscodec.cpp \ - codecs/qeuckrcodec.cpp \ - codecs/qbig5codec.cpp + codecs/qisciicodec.cpp \ + codecs/qtsciicodec.cpp } - qtConfig(iconv) { - HEADERS += codecs/qiconvcodec_p.h - SOURCES += codecs/qiconvcodec.cpp - qtConfig(gnu-libiconv): \ - QMAKE_USE_PRIVATE += iconv - } + qtConfig(icu) { + HEADERS += \ + codecs/qicucodec_p.h + SOURCES += \ + codecs/qicucodec.cpp + } else { + qtConfig(big_codecs) { + HEADERS += \ + codecs/qgb18030codec_p.h \ + codecs/qeucjpcodec_p.h \ + codecs/qjiscodec_p.h \ + codecs/qsjiscodec_p.h \ + codecs/qeuckrcodec_p.h \ + codecs/qbig5codec_p.h - win32 { - SOURCES += codecs/qwindowscodec.cpp - HEADERS += codecs/qwindowscodec_p.h + SOURCES += \ + codecs/qgb18030codec.cpp \ + codecs/qjpunicode.cpp \ + codecs/qeucjpcodec.cpp \ + codecs/qjiscodec.cpp \ + codecs/qsjiscodec.cpp \ + codecs/qeuckrcodec.cpp \ + codecs/qbig5codec.cpp + } + + qtConfig(iconv) { + HEADERS += codecs/qiconvcodec_p.h + SOURCES += codecs/qiconvcodec.cpp + qtConfig(gnu-libiconv): \ + QMAKE_USE_PRIVATE += iconv + } + + win32 { + SOURCES += codecs/qwindowscodec.cpp + HEADERS += codecs/qwindowscodec_p.h + } } } diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp index 330eb7c0384..9c39727946c 100644 --- a/src/corelib/codecs/qiconvcodec.cpp +++ b/src/corelib/codecs/qiconvcodec.cpp @@ -39,8 +39,6 @@ #include -QT_REQUIRE_CONFIG(iconv); - #include "qiconvcodec_p.h" #include "qtextcodec_p.h" #include diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp index 06a6d95e82b..101c3a32785 100644 --- a/src/corelib/codecs/qicucodec.cpp +++ b/src/corelib/codecs/qicucodec.cpp @@ -39,8 +39,6 @@ #include "qicucodec_p.h" -#ifndef QT_NO_TEXTCODEC - #include "qtextcodec_p.h" #include "qutfcodec_p.h" #include "qlatincodec_p.h" @@ -698,5 +696,3 @@ int QIcuCodec::mibEnum() const } QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODEC diff --git a/src/corelib/codecs/qicucodec_p.h b/src/corelib/codecs/qicucodec_p.h index 0c2dbe17d6b..1cbe4d4e7a7 100644 --- a/src/corelib/codecs/qicucodec_p.h +++ b/src/corelib/codecs/qicucodec_p.h @@ -59,9 +59,9 @@ extern "C" { typedef struct UConverter UConverter; } -QT_BEGIN_NAMESPACE +QT_REQUIRE_CONFIG(textcodec); -#ifndef QT_NO_TEXTCODEC +QT_BEGIN_NAMESPACE class QIcuCodec : public QTextCodec { @@ -90,8 +90,6 @@ private: const char *m_name; }; -#endif // QT_NO_TEXTCODEC - QT_END_NAMESPACE #endif diff --git a/src/corelib/codecs/qlatincodec.cpp b/src/corelib/codecs/qlatincodec.cpp index cfbd481f1e1..1b53d26ef47 100644 --- a/src/corelib/codecs/qlatincodec.cpp +++ b/src/corelib/codecs/qlatincodec.cpp @@ -40,8 +40,6 @@ #include "qlatincodec_p.h" #include "qlist.h" -#ifndef QT_NO_TEXTCODEC - QT_BEGIN_NAMESPACE QLatin1Codec::~QLatin1Codec() @@ -238,5 +236,3 @@ int QLatin15Codec::mibEnum() const } QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODEC diff --git a/src/corelib/codecs/qlatincodec_p.h b/src/corelib/codecs/qlatincodec_p.h index 3e258e5ae17..26f9e596a9a 100644 --- a/src/corelib/codecs/qlatincodec_p.h +++ b/src/corelib/codecs/qlatincodec_p.h @@ -54,9 +54,9 @@ #include #include "QtCore/qtextcodec.h" -QT_BEGIN_NAMESPACE +QT_REQUIRE_CONFIG(textcodec); -#ifndef QT_NO_TEXTCODEC +QT_BEGIN_NAMESPACE class QLatin1Codec : public QTextCodec { @@ -86,8 +86,6 @@ public: int mibEnum() const override; }; -#endif // QT_NO_TEXTCODEC - QT_END_NAMESPACE #endif // QLATINCODEC_P_H diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp index beb0a08f620..9ab545d783b 100644 --- a/src/corelib/codecs/qsimplecodec.cpp +++ b/src/corelib/codecs/qsimplecodec.cpp @@ -40,8 +40,6 @@ #include "qsimplecodec_p.h" #include "qlist.h" -#ifndef QT_NO_TEXTCODEC - QT_BEGIN_NAMESPACE #define LAST_MIB 2004 @@ -724,5 +722,3 @@ int QSimpleTextCodec::mibEnum() const } QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODEC diff --git a/src/corelib/codecs/qsimplecodec_p.h b/src/corelib/codecs/qsimplecodec_p.h index 188c3f3cb40..a4b2a45e6bc 100644 --- a/src/corelib/codecs/qsimplecodec_p.h +++ b/src/corelib/codecs/qsimplecodec_p.h @@ -54,9 +54,9 @@ #include #include "QtCore/qtextcodec.h" -QT_BEGIN_NAMESPACE +QT_REQUIRE_CONFIG(textcodec); -#ifndef QT_NO_TEXTCODEC +QT_BEGIN_NAMESPACE template class QAtomicPointer; @@ -79,8 +79,6 @@ private: mutable QAtomicPointer reverseMap; }; -#endif // QT_NO_TEXTCODEC - QT_END_NAMESPACE #endif // QSIMPLECODEC_P_H diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 790921610a0..1ec443cd730 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -38,11 +38,10 @@ ****************************************************************************/ #include "qplatformdefs.h" + #include "qtextcodec.h" #include "qtextcodec_p.h" -#ifndef QT_NO_TEXTCODEC - #include "qbytearraymatcher.h" #include "qlist.h" #include "qfile.h" @@ -1221,5 +1220,3 @@ bool QTextDecoder::hasFailure() const } QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODEC diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index 8153bebac8b..c0261b7aa2d 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -43,11 +43,10 @@ #include #include +QT_REQUIRE_CONFIG(textcodec); + QT_BEGIN_NAMESPACE - -#ifndef QT_NO_TEXTCODEC - class QTextCodec; class QIODevice; @@ -167,8 +166,6 @@ private: QTextCodec::ConverterState state; }; -#endif // QT_NO_TEXTCODEC - QT_END_NAMESPACE #endif // QTEXTCODEC_H diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h index f3c2d090c9c..6e19d1d30e6 100644 --- a/src/corelib/codecs/qtextcodec_p.h +++ b/src/corelib/codecs/qtextcodec_p.h @@ -52,12 +52,13 @@ // #include -#include "qtextcodec.h" #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) + +#include "qtextcodec.h" #if defined(Q_OS_MAC) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX) #define QT_LOCALE_IS_UTF8 @@ -82,7 +83,7 @@ struct QTextCodecUnalignedPointer bool qTextCodecNameMatch(const char *a, const char *b); -#else +#else // without textcodec: class QTextCodec { @@ -109,7 +110,7 @@ public: }; }; -#endif //QT_NO_TEXTCODEC +#endif // textcodec QT_END_NAMESPACE diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index ce1b092a546..0dffdd723ee 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -922,7 +922,7 @@ QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::Convert } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QUtf8Codec::~QUtf8Codec() { @@ -1076,6 +1076,6 @@ QList QUtf32LECodec::aliases() const return list; } -#endif //QT_NO_TEXTCODEC +#endif // textcodec QT_END_NAMESPACE diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h index 659a229dae1..d7743753afa 100644 --- a/src/corelib/codecs/qutfcodec_p.h +++ b/src/corelib/codecs/qutfcodec_p.h @@ -52,7 +52,13 @@ // We mean it. // +#include +#include + +#if QT_CONFIG(textcodec) #include "QtCore/qtextcodec.h" +#endif + #include "private/qtextcodec_p.h" QT_BEGIN_NAMESPACE @@ -311,7 +317,7 @@ struct QUtf32 static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness); }; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) class QUtf8Codec : public QTextCodec { public: @@ -391,7 +397,7 @@ public: }; -#endif // QT_NO_TEXTCODEC +#endif // textcodec QT_END_NAMESPACE diff --git a/src/corelib/codecs/qwindowscodec_p.h b/src/corelib/codecs/qwindowscodec_p.h index 2fd3c35378e..1ca6d5567e0 100644 --- a/src/corelib/codecs/qwindowscodec_p.h +++ b/src/corelib/codecs/qwindowscodec_p.h @@ -53,6 +53,8 @@ #include #include "qtextcodec.h" +QT_REQUIRE_CONFIG(textcodec); + QT_BEGIN_NAMESPACE class QWindowsLocalCodec: public QTextCodec diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index da66e3bcd37..229b4d17a18 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -127,7 +127,6 @@ #define QT_NO_COMPRESS #define QT_JSON_READONLY #define QT_NO_STANDARDPATHS -#define QT_NO_TEXTCODEC #define QT_FEATURE_textcodec -1 #else #define QT_FEATURE_codecs -1 diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h index b3b526342d3..76e46374c3f 100644 --- a/src/corelib/global/qt_pch.h +++ b/src/corelib/global/qt_pch.h @@ -66,5 +66,7 @@ #include #include #include +#if QT_CONFIG(textcodec) #include #endif +#endif diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 4b1b9888d81..580fe6caf3d 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -54,7 +54,7 @@ #include "qstandardpaths.h" #include -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) # include "qtextcodec.h" #endif @@ -677,7 +677,7 @@ void QSettingsPrivate::iniEscapedString(const QString &str, QByteArray &result, if (ch <= 0x1F || (ch >= 0x7F && !useCodec)) { result += "\\x" + QByteArray::number(ch, 16); escapeNextIfDigit = true; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) } else if (useCodec) { // slow result += codec->fromUnicode(&unicode[i], 1); @@ -830,7 +830,7 @@ StNormal: ++j; } -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(codec) #else if (codec) { @@ -1668,7 +1668,7 @@ bool QConfFileSettingsPrivate::readIniFile(const QByteArray &data, int sectionPosition = 0; bool ok = true; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) // detect utf8 BOM const uchar *dd = (const uchar *)data.constData(); if (data.size() >= 3 && dd[0] == 0xef && dd[1] == 0xbb && dd[2] == 0xbf) { @@ -2824,7 +2824,7 @@ QString QSettings::applicationName() const return d->applicationName; } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) /*! \since 4.5 @@ -2877,7 +2877,7 @@ QTextCodec *QSettings::iniCodec() const return d->iniCodec; } -#endif // QT_NO_TEXTCODEC +#endif // textcodec /*! Returns a status code indicating the first error that was met by diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h index d78edd23a2d..ccfec787a66 100644 --- a/src/corelib/io/qsettings.h +++ b/src/corelib/io/qsettings.h @@ -178,7 +178,7 @@ public: QString organizationName() const; QString applicationName() const; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setIniCodec(QTextCodec *codec); void setIniCodec(const char *codecName); QTextCodec *iniCodec() const; diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 4e32f909643..0ea969ece5e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -55,7 +55,6 @@ #include #include #include -#include #ifndef QT_NO_QOBJECT #include #include diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp index e2087b9e640..c3ca2f74e4a 100644 --- a/src/corelib/kernel/qcoreglobaldata.cpp +++ b/src/corelib/kernel/qcoreglobaldata.cpp @@ -38,7 +38,9 @@ ****************************************************************************/ #include "qcoreglobaldata_p.h" +#if QT_CONFIG(textcodec) #include "qtextcodec.h" +#endif QT_BEGIN_NAMESPACE diff --git a/src/corelib/kernel/qcoreglobaldata_p.h b/src/corelib/kernel/qcoreglobaldata_p.h index c3c2f7b4a41..fda6b52b6ec 100644 --- a/src/corelib/kernel/qcoreglobaldata_p.h +++ b/src/corelib/kernel/qcoreglobaldata_p.h @@ -57,7 +57,9 @@ #include "QtCore/qreadwritelock.h" #include "QtCore/qhash.h" #include "QtCore/qbytearray.h" +#if QT_CONFIG(textcodec) #include "QtCore/qtextcodec.h" +#endif #include "QtCore/qmutex.h" QT_BEGIN_NAMESPACE diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index 73307e925a6..c8ad1bc43fe 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -42,7 +42,9 @@ #include "private/qobject_p.h" #include "qurl.h" #include "qstringlist.h" +#if QT_CONFIG(textcodec) #include "qtextcodec.h" +#endif QT_BEGIN_NAMESPACE @@ -150,7 +152,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty if (data.type() == QVariant::ByteArray) { // see if we can convert to the requested type switch(type) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) case QVariant::String: { const QByteArray ba = data.toByteArray(); QTextCodec *codec = QTextCodec::codecForName("utf-8"); @@ -158,7 +160,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty codec = QTextCodec::codecForHtml(ba, codec); return codec->toUnicode(ba); } -#endif // QT_NO_TEXTCODEC +#endif // textcodec case QVariant::Color: { QVariant newData = data; newData.convert(QVariant::Color); diff --git a/src/corelib/serialization/qtextstream.cpp b/src/corelib/serialization/qtextstream.cpp index ee3cb4efcbb..c0a9854d8b3 100644 --- a/src/corelib/serialization/qtextstream.cpp +++ b/src/corelib/serialization/qtextstream.cpp @@ -326,7 +326,7 @@ QT_BEGIN_NAMESPACE */ QTextStreamPrivate::QTextStreamPrivate(QTextStream *q_ptr) : -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) readConverterSavedState(0), #endif readConverterSavedStateOffset(0), @@ -347,12 +347,12 @@ QTextStreamPrivate::~QTextStreamPrivate() #endif delete device; } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) delete readConverterSavedState; #endif } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) static void resetCodecConverterStateHelper(QTextCodec::ConverterState *state) { state->~ConverterState(); @@ -401,7 +401,7 @@ void QTextStreamPrivate::reset() readBufferStartDevicePos = 0; lastTokenSize = 0; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) codec = QTextCodec::codecForLocale(); resetCodecConverterStateHelper(&readConverterState); resetCodecConverterStateHelper(&writeConverterState); @@ -461,7 +461,7 @@ bool QTextStreamPrivate::fillReadBuffer(qint64 maxBytes) if (bytesRead <= 0) return false; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) // codec auto detection, explicitly defaults to locale encoding if the // codec has been set to 0. if (!codec || autoDetectUnicode) { @@ -485,7 +485,7 @@ bool QTextStreamPrivate::fillReadBuffer(qint64 maxBytes) #endif int oldReadBufferSize = readBuffer.size(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) // convert to unicode readBuffer += Q_LIKELY(codec) ? codec->toUnicode(buf, bytesRead, &readConverterState) : QString::fromLatin1(buf, bytesRead); @@ -567,7 +567,7 @@ void QTextStreamPrivate::flushWriteBuffer() } #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (!codec) codec = QTextCodec::codecForLocale(); #if defined (QTEXTSTREAM_DEBUG) @@ -786,7 +786,7 @@ inline void QTextStreamPrivate::consume(int size) */ inline void QTextStreamPrivate::saveConverterState(qint64 newPos) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (readConverterState.d) { // converter cannot be copied, so don't save anything // don't update readBufferStartDevicePos either @@ -807,7 +807,7 @@ inline void QTextStreamPrivate::saveConverterState(qint64 newPos) */ inline void QTextStreamPrivate::restoreToSavedConverterState() { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (readConverterSavedState) { // we have a saved state // that means the converter can be copied @@ -1202,7 +1202,7 @@ bool QTextStream::seek(qint64 pos) return false; d->resetReadBuffer(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) // Reset the codec converter states. resetCodecConverterStateHelper(&d->readConverterState); resetCodecConverterStateHelper(&d->writeConverterState); @@ -1253,7 +1253,7 @@ qint64 QTextStream::pos() const QTextStreamPrivate *thatd = const_cast(d); thatd->readBuffer.clear(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) thatd->restoreToSavedConverterState(); if (d->readBufferStartDevicePos == 0) thatd->autoDetectUnicode = true; @@ -3021,7 +3021,7 @@ QTextStream &ws(QTextStream &stream) Equivalent to QTextStream::setRealNumberPrecision(\a precision). */ -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) /*! \relates QTextStream diff --git a/src/corelib/serialization/qtextstream.h b/src/corelib/serialization/qtextstream.h index ee0b09419de..5c766abc3eb 100644 --- a/src/corelib/serialization/qtextstream.h +++ b/src/corelib/serialization/qtextstream.h @@ -98,7 +98,7 @@ public: explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly); virtual ~QTextStream(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setCodec(QTextCodec *codec); void setCodec(const char *codecName); QTextCodec *codec() const; diff --git a/src/corelib/serialization/qtextstream_p.h b/src/corelib/serialization/qtextstream_p.h index a642beddc4e..172824d27d8 100644 --- a/src/corelib/serialization/qtextstream_p.h +++ b/src/corelib/serialization/qtextstream_p.h @@ -54,7 +54,7 @@ #include #include "qtextstream.h" -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) #include "qtextcodec.h" #endif @@ -118,7 +118,7 @@ public: int stringOffset; QIODevice::OpenMode stringOpenMode; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) // codec QTextCodec *codec; QTextCodec::ConverterState readConverterState; @@ -141,7 +141,7 @@ public: int lastTokenSize; bool deleteDevice; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) bool autoDetectUnicode; #endif diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index f18c4cc8e72..77a195a7e51 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -45,7 +45,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include #ifndef QT_BOOTSTRAPPED @@ -420,7 +422,7 @@ QXmlStreamReader::QXmlStreamReader(const QString &data) : d_ptr(new QXmlStreamReaderPrivate(this)) { Q_D(QXmlStreamReader); -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) d->dataBuffer = data.toLatin1(); #else d->dataBuffer = d->codec->fromUnicode(data); @@ -515,7 +517,7 @@ void QXmlStreamReader::addData(const QString &data) { Q_D(QXmlStreamReader); d->lockEncoding = true; -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) addData(data.toLatin1()); #else addData(d->codec->fromUnicode(data)); @@ -792,7 +794,7 @@ QXmlStreamReaderPrivate::QXmlStreamReaderPrivate(QXmlStreamReader *q) { device = 0; deleteDevice = false; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) decoder = 0; #endif stack_size = 64; @@ -838,7 +840,7 @@ void QXmlStreamReaderPrivate::init() lineNumber = lastLineStart = characterOffset = 0; readBufferPos = 0; nbytesread = 0; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) codec = QTextCodec::codecForMib(106); // utf8 delete decoder; decoder = 0; @@ -903,7 +905,7 @@ inline void QXmlStreamReaderPrivate::reallocateStack() QXmlStreamReaderPrivate::~QXmlStreamReaderPrivate() { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) delete decoder; #endif free(sym_stack); @@ -1482,7 +1484,7 @@ uint QXmlStreamReaderPrivate::getChar_helper() characterOffset += readBufferPos; readBufferPos = 0; readBuffer.resize(0); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (decoder) #endif nbytesread = 0; @@ -1503,7 +1505,7 @@ uint QXmlStreamReaderPrivate::getChar_helper() return StreamEOF; } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (!decoder) { if (nbytesread < 4) { // the 4 is to cover 0xef 0xbb 0xbf plus // one extra for the utf8 codec @@ -1545,7 +1547,7 @@ uint QXmlStreamReaderPrivate::getChar_helper() } #else readBuffer = QString::fromLatin1(rawReadBuffer.data(), nbytesread); -#endif // QT_NO_TEXTCODEC +#endif // textcodec readBuffer.reserve(1); // keep capacity when calling resize() next time @@ -1816,7 +1818,7 @@ void QXmlStreamReaderPrivate::startDocument() if (!QXmlUtils::isEncName(value)) err = QXmlStream::tr("%1 is an invalid encoding name.").arg(value); else { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) readBuffer = QString::fromLatin1(rawReadBuffer.data(), nbytesread); #else QTextCodec *const newCodec = QTextCodec::codecForName(value.toLatin1()); @@ -1828,7 +1830,7 @@ void QXmlStreamReaderPrivate::startDocument() decoder = codec->makeDecoder(); decoder->toUnicode(&readBuffer, rawReadBuffer.data(), nbytesread); } -#endif // QT_NO_TEXTCODEC +#endif // textcodec } } else if (prefix.isEmpty() && key == QLatin1String("standalone")) { hasStandalone = true; @@ -2966,7 +2968,7 @@ public: ~QXmlStreamWriterPrivate() { if (deleteDevice) delete device; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) delete encoder; #endif } @@ -2993,7 +2995,7 @@ public: NamespaceDeclaration emptyNamespace; int lastNamespaceDeclaration; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *codec; QTextEncoder *encoder; #endif @@ -3015,7 +3017,7 @@ QXmlStreamWriterPrivate::QXmlStreamWriterPrivate(QXmlStreamWriter *q) device = 0; stringDevice = 0; deleteDevice = false; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) codec = QTextCodec::codecForMib(106); // utf8 encoder = codec->makeEncoder(QTextCodec::IgnoreHeader); // no byte order mark for utf8 #endif @@ -3032,7 +3034,7 @@ QXmlStreamWriterPrivate::QXmlStreamWriterPrivate(QXmlStreamWriter *q) void QXmlStreamWriterPrivate::checkIfASCIICompatibleCodec() { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) Q_ASSERT(encoder); // test ASCII-compatibility using the letter 'a' QChar letterA = QLatin1Char('a'); @@ -3052,7 +3054,7 @@ void QXmlStreamWriterPrivate::write(const QStringRef &s) if (device) { if (hasIoError) return; -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) QByteArray bytes = s.toLatin1(); #else QByteArray bytes = encoder->fromUnicode(s.constData(), s.size()); @@ -3075,7 +3077,7 @@ void QXmlStreamWriterPrivate::write(const QString &s) if (device) { if (hasIoError) return; -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) QByteArray bytes = s.toLatin1(); #else QByteArray bytes = encoder->fromUnicode(s); @@ -3324,7 +3326,7 @@ QIODevice *QXmlStreamWriter::device() const } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) /*! Sets the codec for this stream to \a codec. The codec is used for encoding any data that is written. By default, QXmlStreamWriter @@ -3382,7 +3384,7 @@ QTextCodec *QXmlStreamWriter::codec() const Q_D(const QXmlStreamWriter); return d->codec; } -#endif // QT_NO_TEXTCODEC +#endif // textcodec /*! \property QXmlStreamWriter::autoFormatting @@ -3847,7 +3849,7 @@ void QXmlStreamWriter::writeStartDocument(const QString &version) d->write(version); if (d->device) { // stringDevice does not get any encoding d->write("\" encoding=\""); -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) d->write("iso-8859-1"); #else const QByteArray name = d->codec->name(); @@ -3871,7 +3873,7 @@ void QXmlStreamWriter::writeStartDocument(const QString &version, bool standalon d->write(version); if (d->device) { // stringDevice does not get any encoding d->write("\" encoding=\""); -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) d->write("iso-8859-1"); #else const QByteArray name = d->codec->name(); diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g index fd69a6e4af7..10bfcd491cb 100644 --- a/src/corelib/serialization/qxmlstream.g +++ b/src/corelib/serialization/qxmlstream.g @@ -291,7 +291,7 @@ public: QIODevice *device; bool deleteDevice; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *codec; QTextDecoder *decoder; #endif @@ -584,7 +584,7 @@ bool QXmlStreamReaderPrivate::parse() lockEncoding = true; documentVersion.clear(); documentEncoding.clear(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (decoder && decoder->hasFailure()) { raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); readBuffer.clear(); diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h index 2350d12dd6a..d30c6bc01f5 100644 --- a/src/corelib/serialization/qxmlstream.h +++ b/src/corelib/serialization/qxmlstream.h @@ -478,7 +478,7 @@ public: void setDevice(QIODevice *device); QIODevice *device() const; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setCodec(QTextCodec *codec); void setCodec(const char *codecName); QTextCodec *codec() const; diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h index f8b1ede9439..61f501f81b7 100644 --- a/src/corelib/serialization/qxmlstream_p.h +++ b/src/corelib/serialization/qxmlstream_p.h @@ -788,7 +788,7 @@ public: QIODevice *device; bool deleteDevice; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *codec; QTextDecoder *decoder; #endif @@ -1081,7 +1081,7 @@ bool QXmlStreamReaderPrivate::parse() lockEncoding = true; documentVersion.clear(); documentEncoding.clear(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (decoder && decoder->hasFailure()) { raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); readBuffer.clear(); diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 82a065efc05..0a8b2b42383 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -44,7 +44,7 @@ #include "qregularexpression.h" #endif #include "qunicodetables_p.h" -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) #include #endif #include @@ -5057,11 +5057,11 @@ static QByteArray qt_convert_to_local_8bit(QStringView string) { if (string.isNull()) return QByteArray(); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *localeCodec = QTextCodec::codecForLocale(); if (localeCodec) return localeCodec->fromUnicode(string); -#endif // QT_NO_TEXTCODEC +#endif // textcodec return qt_convert_to_latin1(string); } @@ -5255,13 +5255,13 @@ QString QString::fromLocal8Bit_helper(const char *str, int size) QStringDataPtr empty = { Data::allocate(0) }; return QString(empty); } -#if !defined(QT_NO_TEXTCODEC) +#if QT_CONFIG(textcodec) if (size < 0) size = qstrlen(str); QTextCodec *codec = QTextCodec::codecForLocale(); if (codec) return codec->toUnicode(str, size); -#endif // !QT_NO_TEXTCODEC +#endif // textcodec return fromLatin1(str, size); } diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index 73748e55a3b..081d7136a7d 100644 --- a/src/corelib/tools/qstringbuilder.cpp +++ b/src/corelib/tools/qstringbuilder.cpp @@ -38,7 +38,6 @@ ****************************************************************************/ #include "qstringbuilder.h" -#include #include QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 42b9e710877..53d9a8a49ae 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp index 771f0fe93dc..a76150d91d2 100644 --- a/src/gui/kernel/qclipboard.cpp +++ b/src/gui/kernel/qclipboard.cpp @@ -46,7 +46,9 @@ #include "qvariant.h" #include "qbuffer.h" #include "qimage.h" +#if QT_CONFIG(textcodec) #include "qtextcodec.h" +#endif #include "private/qguiapplication_p.h" #include @@ -298,16 +300,16 @@ QString QClipboard::text(QString &subtype, Mode mode) const const QByteArray rawData = data->data(QLatin1String("text/") + subtype); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec* codec = QTextCodec::codecForMib(106); // utf-8 is default if (subtype == QLatin1String("html")) codec = QTextCodec::codecForHtml(rawData, codec); else codec = QTextCodec::codecForUtfText(rawData, codec); return codec->toUnicode(rawData); -#else //QT_NO_TEXTCODEC +#else // textcodec return rawData; -#endif //QT_NO_TEXTCODEC +#endif // textcodec } /*! diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index 12e204a09f7..c678a7479d3 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -44,7 +44,6 @@ #include "qpixmap.h" #include "qevent.h" #include "qfile.h" -#include "qtextcodec.h" #include "qguiapplication.h" #include "qpoint.h" #include "qbuffer.h" diff --git a/src/gui/kernel/qt_gui_pch.h b/src/gui/kernel/qt_gui_pch.h index db12ba10780..aa5d3f05723 100644 --- a/src/gui/kernel/qt_gui_pch.h +++ b/src/gui/kernel/qt_gui_pch.h @@ -63,7 +63,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 44d1b2f2018..613ac8fa6ca 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -51,7 +51,9 @@ #include #endif #include +#if QT_CONFIG(textcodec) #include +#endif #include #include #include @@ -181,7 +183,7 @@ QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode) return rich; } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *Qt::codecForHtml(const QByteArray &ba) { return QTextCodec::codecForHtml(ba); diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index 64e39d4648f..140ed628b7c 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -76,7 +76,7 @@ namespace Qt Q_GUI_EXPORT bool mightBeRichText(const QString&); Q_GUI_EXPORT QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) Q_GUI_EXPORT QTextCodec *codecForHtml(const QByteArray &ba); #endif } diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index ea37695f4e8..0c2cb6f87f6 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -43,7 +43,6 @@ #include "qtextlist.h" #include -#include #include #include #include diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp index 731aaf1fcf2..5ea04fe9e9e 100644 --- a/src/gui/text/qtextdocumentwriter.cpp +++ b/src/gui/text/qtextdocumentwriter.cpp @@ -41,7 +41,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include #include "qtextdocument.h" @@ -63,7 +65,7 @@ public: QByteArray format; QIODevice *device; bool deleteDevice; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *codec; #endif @@ -104,7 +106,7 @@ public: QTextDocumentWriterPrivate::QTextDocumentWriterPrivate(QTextDocumentWriter *qq) : device(0), deleteDevice(false), -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) codec(QTextCodec::codecForName("utf-8")), #endif q(qq) @@ -258,7 +260,7 @@ bool QTextDocumentWriter::write(const QTextDocument *document) #ifndef QT_NO_TEXTODFWRITER if (format == "odf" || format == "opendocumentformat" || format == "odt") { QTextOdfWriter writer(*document, d->device); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) writer.setCodec(d->codec); #endif return writer.writeAll(); @@ -272,7 +274,7 @@ bool QTextDocumentWriter::write(const QTextDocument *document) return false; } QTextStream ts(d->device); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) ts.setCodec(d->codec); ts << document->toHtml(d->codec->name()); #endif @@ -286,7 +288,7 @@ bool QTextDocumentWriter::write(const QTextDocument *document) return false; } QTextStream ts(d->device); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) ts.setCodec(d->codec); #endif ts << document->toPlainText(); @@ -317,7 +319,7 @@ bool QTextDocumentWriter::write(const QTextDocumentFragment &fragment) uses UTF-8. */ -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void QTextDocumentWriter::setCodec(QTextCodec *codec) { if (codec == 0) @@ -330,7 +332,7 @@ void QTextDocumentWriter::setCodec(QTextCodec *codec) /*! Returns the codec that is currently assigned to the writer. */ -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *QTextDocumentWriter::codec() const { return d->codec; diff --git a/src/gui/text/qtextdocumentwriter.h b/src/gui/text/qtextdocumentwriter.h index 0502bf1a962..4a57b181b43 100644 --- a/src/gui/text/qtextdocumentwriter.h +++ b/src/gui/text/qtextdocumentwriter.h @@ -70,7 +70,7 @@ public: bool write(const QTextDocument *document); bool write(const QTextDocumentFragment &fragment); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setCodec(QTextCodec *codec); QTextCodec *codec() const; #endif diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 9154182df1e..0aad65479af 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -40,7 +40,6 @@ #include "qtexthtmlparser_p.h" #include -#include #include #include #include diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 30f5bc1051f..1b742cf202e 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -772,7 +772,7 @@ bool QTextOdfWriter::writeAll() return false; } QXmlStreamWriter writer(m_strategy->contentStream); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (m_codec) writer.setCodec(m_codec); #endif diff --git a/src/platformsupport/clipboard/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm index 09901ba0a59..8fa45dd50b6 100644 --- a/src/platformsupport/clipboard/qmacmime.mm +++ b/src/platformsupport/clipboard/qmacmime.mm @@ -418,8 +418,10 @@ QVariant QMacPasteboardMimeUnicodeText::convertToMime(const QString &mimetype, Q QVariant ret; if (flavor == QLatin1String("public.utf8-plain-text")) { ret = QString::fromUtf8(firstData); +#if QT_CONFIG(textcodec) } else if (flavor == QLatin1String("public.utf16-plain-text")) { ret = QTextCodec::codecForName("UTF-16")->toUnicode(firstData); +#endif } else { qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype)); } @@ -432,8 +434,10 @@ QList QMacPasteboardMimeUnicodeText::convertFromMime(const QString & QString string = data.toString(); if (flavor == QLatin1String("public.utf8-plain-text")) ret.append(string.toUtf8()); +#if QT_CONFIG(textcodec) else if (flavor == QLatin1String("public.utf16-plain-text")) ret.append(QTextCodec::codecForName("UTF-16")->fromUnicode(string)); +#endif return ret; } diff --git a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp index 51527254680..2524066301d 100644 --- a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp +++ b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp @@ -269,11 +269,11 @@ int QLibInputKeyboard::keysymToQtKey(xkb_keysym_t key) const int QLibInputKeyboard::keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers *modifiers, const QString &text) const { int code = 0; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *systemCodec = QTextCodec::codecForLocale(); #endif if (keysym < 128 || (keysym < 256 -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) && systemCodec->mibEnum() == 4 #endif )) { diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 94f2125bade..0035d30e363 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index 3f363b62d55..f3629c2eb40 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp index 7170d259fd2..d611f86a9ce 100644 --- a/src/plugins/platforms/xcb/qxcbmime.cpp +++ b/src/plugins/platforms/xcb/qxcbmime.cpp @@ -168,7 +168,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, if (!encoding.isEmpty() && atomName == format + QLatin1String(";charset=") + QLatin1String(encoding)) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (requestedType == QVariant::String) { QTextCodec *codec = QTextCodec::codecForName(encoding); if (codec) diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index 5a100b8075a..49bceb88a0e 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -48,7 +48,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include #include @@ -82,7 +84,7 @@ class QMYSQLDriverPrivate : public QSqlDriverPrivate public: QMYSQLDriverPrivate() : QSqlDriverPrivate(), mysql(0), -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) tc(QTextCodec::codecForLocale()), #else tc(0), @@ -96,7 +98,7 @@ public: static inline QString toUnicode(QTextCodec *tc, const char *str) { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(tc); return QString::fromLatin1(str); #else @@ -106,7 +108,7 @@ static inline QString toUnicode(QTextCodec *tc, const char *str) static inline QString toUnicode(QTextCodec *tc, const char *str, int length) { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(tc); return QString::fromLatin1(str, length); #else @@ -116,7 +118,7 @@ static inline QString toUnicode(QTextCodec *tc, const char *str, int length) static inline QByteArray fromUnicode(QTextCodec *tc, const QString &str) { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(tc); return str.toLatin1(); #else @@ -251,7 +253,7 @@ public: bool preparedQuery; }; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) static QTextCodec* codec(MYSQL* mysql) { #if MYSQL_VERSION_ID >= 32321 @@ -261,7 +263,7 @@ static QTextCodec* codec(MYSQL* mysql) #endif return QTextCodec::codecForLocale(); } -#endif // QT_NO_TEXTCODEC +#endif // textcodec static QSqlError qMakeError(const QString& err, QSqlError::ErrorType type, const QMYSQLDriverPrivate* p) @@ -1199,7 +1201,7 @@ QMYSQLDriver::QMYSQLDriver(MYSQL * con, QObject * parent) init(); if (con) { d->mysql = (MYSQL *) con; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) d->tc = codec(con); #endif setOpen(true); @@ -1428,14 +1430,14 @@ bool QMYSQLDriver::open(const QString& db, if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) { // force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters) mysql_set_character_set(d->mysql, "utf8mb4"); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) d->tc = QTextCodec::codecForName("UTF-8"); #endif } else { // force the communication to be utf8 mysql_set_character_set(d->mysql, "utf8"); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) d->tc = codec(d->mysql); #endif } diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp index 46a1e66bccb..b1567cc3c51 100644 --- a/src/tools/uic/main.cpp +++ b/src/tools/uic/main.cpp @@ -137,7 +137,7 @@ int runUic(int argc, char *argv[]) return 1; } out = new QTextStream(&f); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) out->setCodec(QTextCodec::codecForName("UTF-8")); #endif } diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index ba315d4338e..b71efabcc97 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -58,7 +58,6 @@ #include "qstyle.h" #include "qstyleoption.h" #include "qstylefactory.h" -#include "qtextcodec.h" #include "qtooltip.h" #include "qtranslator.h" #include "qvariant.h" diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h index 924a68d62e1..bec6536637d 100644 --- a/src/widgets/kernel/qt_widgets_pch.h +++ b/src/widgets/kernel/qt_widgets_pch.h @@ -63,7 +63,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp index fa4dd14c929..29fd07edc13 100644 --- a/src/widgets/widgets/qtextbrowser.cpp +++ b/src/widgets/widgets/qtextbrowser.cpp @@ -47,7 +47,9 @@ #include #include #include "private/qtextdocumentlayout_p.h" +#if QT_CONFIG(textcodec) #include +#endif #include #include #if QT_CONFIG(whatsthis) @@ -290,7 +292,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url) if (data.type() == QVariant::String) { txt = data.toString(); } else if (data.type() == QVariant::ByteArray) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QByteArray ba = data.toByteArray(); QTextCodec *codec = Qt::codecForHtml(ba); txt = codec->toUnicode(ba); diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 91796106a27..5893d8448e1 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -49,7 +49,9 @@ #include #include #include +#if QT_CONFIG(textcodec) #include +#endif #include #include #include "private/qxml_p.h" @@ -4149,7 +4151,7 @@ static QString encodeText(const QString &str, const bool performAVN = false, const bool encodeEOLs = false) { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(s); #else const QTextCodec *const codec = s.codec(); @@ -4191,7 +4193,7 @@ static QString encodeText(const QString &str, len += 4; i += 5; } else { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if(codec->canEncode(ati)) ++i; else @@ -6428,7 +6430,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod const QDomNodePrivate* n = first; if(encUsed == QDomNode::EncodingFromDocument) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) const QDomNodePrivate* n = first; QTextCodec *codec = 0; @@ -6464,7 +6466,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod else { // Write out the XML declaration. -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) const QLatin1String codecName("iso-8859-1"); #else const QTextCodec *const codec = s.codec(); diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index 168e8c3cb44..7b6669b0576 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -39,7 +39,9 @@ #include "qxml.h" #include "qxml_p.h" +#if QT_CONFIG(textcodec) #include "qtextcodec.h" +#endif #include "qbuffer.h" #include "qregexp.h" #include "qmap.h" @@ -237,7 +239,7 @@ public: int pos; int length; bool nextReturnedEndOfData; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextDecoder *encMapper; #endif @@ -1075,7 +1077,7 @@ void QXmlInputSource::init() d->inputStream = 0; setData(QString()); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) d->encMapper = 0; #endif d->nextReturnedEndOfData = true; // first call to next() will call fetchData() @@ -1121,7 +1123,7 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev) QXmlInputSource::~QXmlInputSource() { // ### close the input device. -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) delete d->encMapper; #endif delete d; @@ -1284,7 +1286,7 @@ void QXmlInputSource::fetchData() } } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) static QString extractEncodingDecl(const QString &text, bool *needMoreText) { *needMoreText = false; @@ -1326,7 +1328,7 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) return encoding; } -#endif // QT_NO_TEXTCODEC +#endif // textcodec /*! This function reads the XML file from \a data and tries to @@ -1341,7 +1343,7 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) */ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning) { -#ifdef QT_NO_TEXTCODEC +#if !QT_CONFIG(textcodec) Q_UNUSED(beginning); return QString::fromLatin1(data.constData(), data.size()); #else From 993351183893c8c5b1e55b8d819b190cc11ae008 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Sun, 7 Oct 2018 16:16:41 +0100 Subject: [PATCH 6/9] Fix typo in define. s/GL_FRAMEBUFFER_SRB/GL_FRAMEBUFFER_SRGB Found with clazy Change-Id: Ied84c0fa95a7ae7b7791e167695acfc7877f7e25 Reviewed-by: Sean Harmer --- src/gui/painting/qplatformbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index cc8d850689a..e05efca9c81 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -71,7 +71,7 @@ #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 #endif -#ifndef GL_FRAMEBUFFER_SRB +#ifndef GL_FRAMEBUFFER_SRGB #define GL_FRAMEBUFFER_SRGB 0x8DB9 #endif #ifndef GL_FRAMEBUFFER_SRGB_CAPABLE From 38b87cc4bb0d4dfb47d907d39906104fea60a187 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 3 Oct 2018 15:55:06 +0200 Subject: [PATCH 7/9] Doc: Clarify what samples() returns if not explicitly set Change-Id: Icf4478121a9d67356eb976039c666d6945a2099c Reviewed-by: Paul Wicking Reviewed-by: Laszlo Agocs --- src/gui/kernel/qsurfaceformat.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 574310f5548..1a814ec21fb 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -319,7 +319,8 @@ void QSurfaceFormat::setStereo(bool enable) /*! Returns the number of samples per pixel when multisampling is - enabled. By default, multisampling is disabled. + enabled, or \c -1 when multisampling is disabled. The default + return value is \c -1. \sa setSamples() */ From bdebc90c2826866e4434a6429aa6f822ee3cb8f6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 8 Nov 2018 11:26:39 +0100 Subject: [PATCH 8/9] Bump version Change-Id: I02c0289a7c8a5becde63875fa684075a2a3a4eba --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index afdc0cb413b..24e408e027d 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -4,4 +4,4 @@ CONFIG += warning_clean QT_SOURCE_TREE = $$PWD QT_BUILD_TREE = $$shadowed($$PWD) -MODULE_VERSION = 5.11.2 +MODULE_VERSION = 5.11.3 From dec7961709c90f6977d2447f7fa6c6625af41cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 6 Nov 2018 12:08:05 +0100 Subject: [PATCH 9/9] QSyntaxHighlighter: Delay all highlights until first rehighlight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When calling setDocument (directly or through the constructor) a delayed rehighlight is initiated. Previously, if any text was changed before this rehighlight could run it would cancel the rehighlight, even if the changed text only caused a new block of text to be highlighted. Fixes: QTBUG-71307 Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779 Reviewed-by: Jędrzej Nowacki --- src/gui/text/qsyntaxhighlighter.cpp | 10 +++++----- .../qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index fcda17605f8..b09f8b565ad 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -157,14 +157,12 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded) { - if (!inReformatBlocks) + if (!inReformatBlocks && !rehighlightPending) reformatBlocks(from, charsRemoved, charsAdded); } void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded) { - rehighlightPending = false; - QTextBlock block = doc->findBlock(from); if (!block.isValid()) return; @@ -346,8 +344,10 @@ void QSyntaxHighlighter::setDocument(QTextDocument *doc) if (d->doc) { connect(d->doc, SIGNAL(contentsChange(int,int,int)), this, SLOT(_q_reformatBlocks(int,int,int))); - d->rehighlightPending = true; - QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight())); + if (!d->doc->isEmpty()) { + d->rehighlightPending = true; + QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight())); + } } } diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp index 0a2e0247017..9d6ce78b242 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp +++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp @@ -74,6 +74,7 @@ private slots: void emptyBlocks(); void setCharFormat(); void highlightOnInit(); + void highlightOnInitAndAppend(); void stopHighlightingWhenStateDoesNotChange(); void unindent(); void highlightToEndOfDocument(); @@ -265,6 +266,19 @@ void tst_QSyntaxHighlighter::highlightOnInit() QTRY_VERIFY(hl->highlighted); } +void tst_QSyntaxHighlighter::highlightOnInitAndAppend() +{ + cursor.insertText("Hello"); + cursor.insertBlock(); + cursor.insertText("World"); + + TestHighlighter *hl = new TestHighlighter(doc); + cursor.insertBlock(); + cursor.insertText("More text"); + QTRY_VERIFY(hl->highlighted); + QVERIFY(hl->highlightedText.endsWith(doc->toPlainText().remove(QLatin1Char('\n')))); +} + class StateTestHighlighter : public QSyntaxHighlighter { public: @@ -330,6 +344,7 @@ void tst_QSyntaxHighlighter::unindent() QCOMPARE(doc->toPlainText(), plainText); TestHighlighter *hl = new TestHighlighter(doc); + QTRY_VERIFY(hl->highlighted); hl->callCount = 0; cursor.movePosition(QTextCursor::Start);