summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
Commit message (Collapse)AuthorAgeFilesLines
...
* | Compile with QT_STRICT_ITERATORS definedLars Knoll2018-11-261-2/+2
|/ | | | | | | This will be the only options for Qt 6, so make sure the code compiles now. Change-Id: I23f791d1efcbd0bd33805bb4563d40460954db43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-0914-84/+73
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * Modernize the "textcodec" featureLiang Qi2018-11-0714-84/+73
| | | | | | | | | | | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Optimize QTextCodec::codecForUtfText a littleThiago Macieira2018-11-081-14/+14
| | | | | | | | | | | | | | | | | | Instead of doing byte comparisons, let the compiler do 16- and 32-bit comparisons on its own. Change-Id: If7e743cf8476463880ccfffd155f8629991b0b87 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | QTextCodec: update the docs for codecForUtfTextThiago Macieira2018-11-081-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | It can detect the standard UTF codecs, but not non-standard like UTF-7[1], UTF-9 or UTF-18[2]. [1] https://tools.ietf.org/html/rfc2152 [2] https://tools.ietf.org/html/rfc4042 Fixes: QTBUG-67188 Change-Id: If7e743cf8476463880ccfffd155f853dc947421a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QUtf8Codec: Use one 32-byte load instead of two 16-byte ones on AVX2Thiago Macieira2018-11-081-1/+6
| | | | | | | | | | | | | | | | | | The number of instructions is the same. But if the CPU can issue 32-byte-wide loads, this will be faster. For CPUs that would do two 16-byte loads, this is no worse than current code. Change-Id: I8f261579aad648fdb4f0fffd1553d060b4fc852f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update various qt_attribution.json filesEdward Welbourne2018-11-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Marking various as final because no upstream is known or available. Listing versions of others, where I was able to discover them. Updated a stale link (that helpfully redirected). Task-number: QTBUG-70008 Change-Id: Id00f34827133c560735c68793b4f1353f2b2ca85 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-1721-91/+54
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Modernize the "codecs" featureLiang Qi2018-10-127-23/+19
| | | | | | | | | | | | Change-Id: Idee19112581bff64a2e0b8e331dd3d779aca165b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Modernize the "big_codecs" featureLiang Qi2018-10-1216-68/+35
| | | | | | | | | | | | Change-Id: Ic23f4a1f81a21711cd81aaa2942b493aca5b38b8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add tests for decoding too-short UTF-8 sequencesThiago Macieira2018-09-253-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | We were handling this properly, but not testing them. I guess we weren't testing because the condition is a valid intermediate state, so hasFailure() is correct it returning false. Testing inspired by the bug reported in https://github.com/intel/tinycbor/issues/137 Change-Id: Ib47c56818178458a88b4fffd1554ecfdd0af637e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | WebAssembly for QtBaseMorten Johan Sørvig2018-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add a few overrides in Qt CoreAlessandro Portale2018-08-058-74/+74
| | | | | | | | | | | | | | | | | | Clang-tidy says: warning: annotate this function with 'override' or (rarely) 'final' [modernize-use-override] Change-Id: Ic2304cf35f4132ba1f55714493db93836f8b413d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Improve the UTF-16 and UTF-32 codecs with <qendian.h>Thiago Macieira2018-07-041-28/+12
| | | | | | | | | | | | | | | | This is just the low-hanging fruit. Those algorithms could be much further improved, but they are so seldom-used that it's not worth it. Change-Id: I6a540578e810472bb455fffd15332b2a7a1ac901 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Deregister QTextCodec on destructionIgor Mironchik2018-05-261-0/+18
| | | | | | | | | | | | | | | | | | | | | | QTextCodec automatically deregisters on destruction now. [ChangeLog][QtCore][QTextCodec] QTextCodec automatically deregisters on destruction now. Task-number: QTBUG-56203 Change-Id: Ic9a66c512642c9913aa27ea5167b9f7341e7f0fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString: insert a number of 8-character SIMD loopsThiago Macieira2018-05-151-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | We don't have _mm_cvtsi64_si128() (the REX.W expansion of MOVD [0F 6E]), but we do have _mm_loadl_epi64(), the SSE2 expansion of the MMX MOVQ at opcode 0F 7E. Ditto for _mm_cvtsi128_si64() and _mm_storel_epi64(). And those work even in 32-bit mode. By doing this, we can reduce the tail unrolled loops by half, reducing code size. I'm not adding these new SIMD sections to -Os builds. Change-Id: Ib48364abee9f464c96c6fffd152e405310ef67be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QUtf8: add AVX2 code for isValidUtf8Thiago Macieira2018-05-151-0/+22
|/ | | | | Change-Id: I5d0ee9389a794d80983efffd152d2beca86c5779 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QUtf8: Add some UTF-8 text operation functionsThiago Macieira2018-02-032-1/+169
| | | | | | | | | | | The first, isValidUtf8(), as the name says, returns true if the string is valid UTF-8. As a bonus, it also returns whether it's valid US-ASCII. The other two are meant to compare an UTF-8 string to either a Latin1 one or an UTF-8 one, without memory allocation. Change-Id: Ic38ec929fc3f4bb795dafffd150ad0d63e28cd32 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove references to obsolete platformsJake Petroules2017-11-052-4/+4
| | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-3/+3
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-195-49/+49
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * QGbkCodec: Initialize buf arraysFriedemann Kleint2017-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix developer build with GCC 7, which complains: codecs\qgb18030codec.cpp:387:37: error: 'buf[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:8908:17: error: 'buf[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:536:37: error: 'buf[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:535:37: error: 'buf[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I7e98355c625276c74792707f22d4318c0cc9be6a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QtBase: use new QStaticByteArrayMatcher where applicableMarc Mutz2017-04-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even for compilers that don't yet support C++14 constexpr, this should improve performance of searches a lot, if, indeed, Boyer-Moore still is an optimization over linear searching at all in these days of hardware prefetchers and deep CPU pipelines, because the setup cost is only incurred once. As function-statics, we also don't care about startup ordering and cost. It's a pity that the platform that would benefit the most - Windows - doesn't have constexpr support, yet. Change-Id: I827df135854fd6fbd6546e248dc37ef0fbaf1792 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | QText{En,De}coder: mark ctors explicitMarc Mutz2017-04-061-2/+2
| | | | | | | | | | | | | | C++11 allows these to be called implicitly. Change-Id: Ife62ce4df4c294623e84fb0c0751ae9b4f6d1020 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTextCodec: add QStringView overloadsMarc Mutz2017-04-062-0/+51
|/ | | | | | | | | | [ChangeLog][QtCore][QTextCodec] Added fromUnicode() and canEncode() overloads taking QStringView. [ChangeLog][QtCore][QTextEncoder] Added fromUnicode() overload taking QStringView. Change-Id: I2599f25570480d967921ccd4414e092bfc90d821 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-1/+0
| | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Properly use QT_CONFIG macro to check for ICULars Knoll2016-11-291-9/+9
| | | | | | | And remove the QT_USE_ICU define. Change-Id: I8134ee18af7c90ed7070926ca31b3a57b3ec37dd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-241-5/+5
|\ | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tools/configure/configureapp.cpp tools/configure/environment.cpp Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
| * QtCore: Add missing overrideAlexander Volkov2016-11-161-5/+5
| | | | | | | | | | Change-Id: Ifdec31aabdd0371f36abbb382e49f52f5b58ee94 Reviewed-by: hjk <hjk@qt.io>
* | Remove Mac specific code paths from qiconvcodecLars Knoll2016-11-232-45/+1
| | | | | | | | | | | | | | | | The code is dead, as the codec is never used on macOS. Change-Id: I86138f1c95e5564256b4d592f0044e83658def93 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Clean up iconv configurationLars Knoll2016-11-234-18/+12
| | | | | | | | | | | | | | | | Turn iconv off if ICU is being used (in line with codecs.pri) and get rid of the DEFINES += GNU_LIBICONV in the pri file. Change-Id: I6fbca975498adbb3e67f913ae9b1dd5cc53ee8da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add missing QBIG5CODEC_LICENSE.txt fileKai Koehne2016-11-041-0/+25
| | | | | | | | | | | | | | Add file that was forgotten in eb9681397609eee38703f. Change-Id: Ib288bfc1f1f9cb4857e42f2fa3fe750e23b56aea Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Document use of BSD code in Qt CoreKai Koehne2016-10-288-238/+248
| | | | | | | | | | Change-Id: I31305e40dc57ddd37e5ef35a52cc99dc7ebb3bc5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge dev into 5.8Oswald Buddenhagen2016-08-221-13/+10
|\ \ | | | | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * | iconv-related cleanup in codecs.priLars Knoll2016-08-191-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration system already takes care of setting QT_NO_ICONV. Also move the platform conditions for using iconv from the pri file to the .json. Change-Id: I91b08bcee6799deddabcbb4a91d0a3f9ed7f0f28 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | Use qtConfig throughout in qtbaseLars Knoll2016-08-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | employ QMAKE_USE: LIBS += -lfooOswald Buddenhagen2016-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Standardize some "We mean it" commentsFriedemann Kleint2016-08-171-3/+3
|/ / | | | | | | | | | | | | Fix the occurrences where the wrong classes are mentioned. Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Make sure all private headers in Qt Core include qglobal_p.hThiago Macieira2016-06-2513-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | The rule was: - if the header included qglobal.h, turn that into qglobal_p.h - otherwise, insert the #include after the "We mean it" warning qglobal_p.h currently only includes qglobal.h. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Aarch64: vectorize ascii de-/encoding.Erik Verbruggen2016-06-091-1/+72
| | | | | | | | | | | | | | | | | | | | | | This works only on Aarch64, because the vaddv instruction is only available on 64bit ARM. Doing something equivalent on 32bit ARM has the high chance to run into micro-architecture differences: on an Cortex-a8, transferring a single vector element from NEON to the regular CPU registers takes 20 cycles(!). Change-Id: Iccbfe84da82abb9b10f3f3dc35c8b950df69e251 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove _bit_scan_{forward,reverse}Erik Verbruggen2016-05-311-3/+13
| | | | | | | | | | | | | | | | | | | | Use qCountTrailingZeroBits and qCountLeadingZeroBits from qalgorithms.h instead. Also extended these versions for MSVC. The _bit_scan_* versions stem from a time before the glorious days of qalgorithms.h. A big advantage is that these functions can be used on all platforms. Change-Id: I5a1b886371520310a7fe16e617635ea335046beb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for Apple tvOSMike Krus2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-3/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-3/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| | * QWindowsLocalCodec::convertFromUnicode(): preclude stack overflow.Edward Welbourne2016-04-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is called by QString::toLocal8Bit_helper(), so using QString::toLocal8Bit() on the input in an error message on failure to decode would be apt to recurse on the same data (if such an error ever arises). Furthermore, the qWarning()'s format string even claimed what it was displaying was in UTF-8. Fix by using native fprintf and UTF-16. Thanks to Frédéric Marchal for spotting this and checking that such errors aren't (at present) possible. Change-Id: I1ad441f2e3700bc01256d6c1718d404e27bce488 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtBase: use printf-style qWarning/qDebug where possible (II)Marc Mutz2016-05-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this second part, replace qWarning() << "" << non-QString with qWarning("..%.", non-QString). QString (and QUrl etc) have special escaping handling when streamed into QDebug, so leave those alone. They also seem to expand to less code than the qPrintable() alternative, so there's no reason to replace them. Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui, Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds. Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Change the way we handle features that have sub-featuresLars Knoll2016-04-151-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we always set the base feature as a flag in qtconfig, and set the sub-feature in addition if it's being used. Change-Id: Icfeb0ec1ac9e1a615b5b22eb5fcce47e0e7fc153 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf