summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Remove handling of missing Q_COMPILER_CLASS_ENUMAllan Sandfeld Jensen2019-04-061-1/+1
| | | | | Change-Id: I1fd6d601e49e803b4c3308fb0ca41136c628afbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-0418-262/+167
|\ | | | | | | refs/staging/dev
| * Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-0314-145/+145
| | | | | | | | | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Replace Q_NULLPTR with nullptr in corelibAllan Sandfeld Jensen2019-04-031-1/+1
| | | | | | | | | | Change-Id: I9cdb5b7015c62c50b35f8a6519ea4e777db97683 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove special NOTHROW handlingAllan Sandfeld Jensen2019-04-031-12/+1
| | | | | | | | | | | | | | We no longer have any MSVC support that wouldn't set Q_DECL_NOEXCEPT Change-Id: I3e2c74cb89b9c56ffaf17001004c87b88622da82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-03-311-1/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/configure.json Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-1/+5
| | |\ | | | | | | | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| | | * Accept that glibc's statx() falls back for usThiago Macieira2019-03-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So we don't need to have a high kernel requirement on its account. I needed to introduce a configure-time check because we need to include a header to get the __GLIBC__ macro, but we can't include any header in assembler until we know it's glibc (we need to know that the header is assembler-safe). glibc, uClibc and MUSL do provide an assembler-safe features.h, but Bionic does not. And we need to know that it's glibc's implementation, since the fallback was not required. The other three libraries may not implement such a thing when they get around to adding the system call. Fixes: QTBUG-74526 Change-Id: I1004b4b819774c4c9296fffd158d14da98bf571c Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Doc-fixes in QRandomGenerator::bounded(int...)Edward Welbourne2019-03-291-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They return int, not quint32. Change-Id: I9879b58cccf9ea324ea1fc0c567a9d30b82fa44d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Simplify finite/NaN testing for qfloat16Edward Welbourne2019-03-264-107/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing endian-dependent selection of bytes of the value was a clumsy surrogate for just accessing the intenal quint16 shifted suitably. Change-Id: Icfd9d1d18f69eb94b041b8d32275df606c14c2b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usageAllan Sandfeld Jensen2019-04-044-6/+6
|/ / / | | | | | | | | | | | | Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add qFpClassify() to mirror std::fpclassify()Edward Welbourne2019-03-193-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rules of std don't permit us to add an overload for fpclassify(qfloat16), so we need our own equivalent that we *can* overload. Deploy it in the few places we use fpclassify(). Extended qnumeric's testing to cover qFpClassify(). Change-Id: Ie5a0a5cc24599d1571404c573d33c682b0d305a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | More nullptr usage in headersKevin Funk2019-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-011-5/+7
|\| | | | | | | | | | | Change-Id: Icec0aa703d8a13efa9f1634a1a353eb9d63685c8
| * | Properly deprecate assorted enum membersEdward Welbourne2019-02-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the first uses of Q_DECL_ENUMERATOR_DEPRECATED. Prompted by API change review for 5.13, comment by Christian Ehrlicher. Task-number: QTBUG-73484 Change-Id: Ic106048cec18960a91f88eb12650abab6abf0e97 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-272-2/+2
|\| | | | | | | | | | | Change-Id: I14eaabe98845445a9ea5266872cc1797786cfe04
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-261-1/+1
| |\| | | | | | | | | | Change-Id: Id511850002d9274d17891c063376ac4b3ff939dd
| | * Make the qfloat16tables.cpp depend on the executable, not the commandThiago Macieira2019-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtPrepareTool could return a more complex command-line in the variable, for some reason. So declare the dependency on the actual executable only. Change-Id: Id061f35c088044b69a15fffd1583504f25936a7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | Fix can not -> cannotRobert Loehning2019-02-251-1/+1
| | | | | | | | | | | | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-202-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp Added tests/auto/testlib/selftests/expected_crashes_5.txt to work round the output of the crashes test (which exercises UB, see QTBUG-73903) being truncated on one test platform. Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
| * | wasm: fix build with emsdk 1.38.26Lorn Potter2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | emscripten removed their fake SSE support, which removed x86intrin.h Task-number: QTBUG-73657 Change-Id: I77094fc77be3e685adf9e16d8c3e6aebde9b0687 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-0/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| | * Add doc note about Qt::MSWindowsFixedSizeDialogHint and High DPIFriedemann Kleint2019-01-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a note explaining that it should not be used in multi-monitor environments. Task-number: QTBUG-73232 Change-Id: I7b61cef74eac4082efe849b3d5bdbbe5f04fcdbb Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Remove eval modeKai Koehne2019-02-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation mode of Qt hasn't been used since quite some time. Let's just remove the remaining logic from the code base. Change-Id: I61a2c432cbae78bf973f882848b3732e27431351 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Shave ~5% off from signal emission timeLars Knoll2019-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor activate(), so that we eliminate almost all checks for signal hooks in the common case. Here are the benchmark numbers showing the improvement for 100M signal emissions without change with change string based connect: 3836 3693 pointer based connect: 4571 4510 not connected: 479 433 disconnected: 559 522 Change-Id: I394e6ea5d5bc96e298e8cc0c763eed78c8041876 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Get rid of the connectedSignals bitflagsLars Knoll2019-02-081-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Measurements show that it's just almost as fast to simply query the connectionlist directly and avoid both the memory overhead of the bitfield and the associated bookkeeping. For connected signals, the difference is not relevant at all. With a signal that was never connected, removing the bitfield will cause signal emission to be ~2.5% faster. And if you ever disconnect from a signal, the bitfields might not be accurate and this can cause a major slowdown. Here are some numbers to validate this. All times are measured in ms for 100M signal emissions: without change with change string based connect: 3817 3836 pointer based connect: 4552 4571 not connected: 493 479 disconnected: 2113 559 Change-Id: Ia2c85036afaa7f991b883c8ff812f69cf4580f7e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: hjk <hjk@qt.io>
* | Enable deprecation warnings by defaultGiuseppe D'Angelo2019-02-022-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Qt 6 in sight, people need to start moving away from their deprecated APIs, as we want to remove them all in 6.0. We are marking deprecated APIs with deprecation attributes, but by default we're disabling deprecation warnings, making them an opt-in by the user. We need to do the opposite: make deprecation warnings enabled by default, and have an opt-out define. [ChangeLog][QtCore][Important Behavior Changes] Qt now enables by default warnings when using APIs marked as deprecated. It is possible to disable such warnings by defining the QT_NO_DEPRECATED_WARNINGS macro. The old QT_DEPRECATED_WARNINGS macro which was used to enable this warning now has no effect (warnings are automatically enabled). Task-number: QTBUG-73048 Change-Id: Ie2b024fd667eb876b6ac9054cbbbc5a455cb9d5c Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-262-1/+3
|\| | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-232-1/+3
| |\ | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-084-7/+17
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | * | Fix build in INTEGRITY: __mulh is not definedThiago Macieira2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6b875f0625acc6c6a4f8899b829176baaf7d8502 created a macro for it, but in the multiple updates to find the best solution, we forgot to use it. Fixes: QTBUG-72429 Change-Id: I4ac1156702324f0fb814fffd156f27c1789d1409 Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Add "Mojave" to QSysInfo::prettyProductName()Thiago Macieira2018-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-72489 Change-Id: I4ac1156702324f0fb814fffd156fcecfa95a1a2d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-212-10/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | | Fix alignment-warnings about Q_DECLARE_PRIVATE's castsEdward Welbourne2019-01-151-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_DECLARE_PRIVATE gets used in the declaration of the public class, where the private class is typically visible only as a forward-decl, with no knowledge of what it's based on; consequently, the macro is obliged to use reinterpret_cast<>, which is subject to warnings when the compiler *can* see both types and their alignments differ. The same applies to Q_DECLARE_PRIVATE_D. So suppress gcc's -Wcast-align around the d_func() return statements. (If we get similar problems with other compilers we can add their suppressions likewise; but, for now, we've only seen this on MIPS64, where we use gcc.) This tripped over one use of Q_DECLARE_PRIVATE in a private Q_SLOTS: section; for some reason, gcc didn't like the semicolon on the friend declaration. Changing the context to plain private fixed that. Fixes: QTBUG-72885 Change-Id: I5edc11d46bd4eb820713adede79d53191a7e2736 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Boxiang Sun <daetalusun@gmail.com>
| * | | Increase sysctl argument buffer size to include null characterRoland Rossgotterer2019-01-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An UUID is 36 characters long, but sysctl and sysctlbyname return a null terminated string with 37 characters. That was too long for the provided buffer. Surprisingly the return code was still 0 instead of -1. The returned buffer was empty though. Change-Id: Ic4d20ecc1b2b3a3e98468d31ac304957d56deee9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Always access the 64-bit registry key to read MachineGuidRoland Rossgotterer2019-01-091-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running a 32bit application on a 64bit Windows, the call to open the key "HKLM/Software/Microsoft/Cryptography/MachineGuid" will by default be redirect to "HKLM/Software/WOW6432Node/Microsoft/Cryptography/MachineGuid" which does not exist. Instead access the 64bit key from either a 32bit or 64bit application. KEY_WOW64_64KEY has no effect on 32bit Windows. Change-Id: Ic5e13f99d08aef2658d58a52cffe66dbab0510b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-071-2/+2
|\| | | | | | | | | | | Change-Id: Ieb57137ee2b7d0c505e3531d5aa1bcb66978847e
| * | Fix qbswap calls for Big Endian targetsVille Voutilainen2019-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-71945 Change-Id: I5356f8e32d00ea591b1f65cdd4111276fcf876ac Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Khem Raj <raj.khem@gmail.com>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-043-5/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| * | QtCore: Unify license headersKai Koehne2018-12-221-1/+1
| | | | | | | | | | | | | | | Change-Id: Iff4f6da9f0bbf7a0627101f455dd8467681b2783 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | MSVC x86: implement add_overflow for quint64Thiago Macieira2018-12-211-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no 64-bit ADD instruction, so we make do with ADD+ADC. This is what Clang generates. ICC uses the two as well, but then performs some subtractions to find out if it overflowed. GCC for some inexplicable reason attempts to use SSE2 if that's enabled, otherwise it performs the subtractions like ICC. Alternative implementation which generates better code, but violates strict aliasing: uint *low = reinterpret_cast<uint *>(r); uint *high = low + 1; return _addcarry_u32(_addcarry_u32(0, unsigned(v1), unsigned(v2), low), v1 >> 32, v2 >> 32, high); Manual testing shows this works. tst_qnumeric passes in debug mode. MSVC 2017 15.9 still miscompiles in release mode (reported to MS as [1]). [1] https://developercommunity.visualstudio.com/content/problem/409039/-addcarry-u32-wrong-results-with-constant-inputs.html Change-Id: I61ce366d57bc46c89db5fffd15704d53ebd4af3c Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Fix qfloat16 methods definition without declaration when using Q_QDOCAntonio Larrosa2018-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes qtdoc failing to build on i586 because of an assertion in libclang since Q_QDOC is defined and thus the declaration of the qfloat16(float) constructor and operator float() are removed, thus their definitions should be removed too, which is what this patch does. Fixes: QTBUG-72725 Done-with: Michal Srb <msrb@suse.com> Change-Id: I6424873425d46345e09f411f9ce88f2520825da4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * | Remove "x" that was clearly a typoThiago Macieira2018-12-151-1/+1
| |/ | | | | | | | | | | | | Or something I used for debugging. Change-Id: I61ce366d57bc46c89db5fffd15704e1d010749b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | RCC: Add support for Zstandard compressionThiago Macieira2018-12-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][RCC] RCC now supports compressing content using the Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses better for the same CPU time, so this algorithm is the default. To go back to the previous algorithm, pass command-line option --compress-algo=zlib. Compression levels range from 1 (fastest, least compression) to 19 (slowest, best compression). Level 0 tells the library to choose an implementation-defined default. \ The default compression level is "heuristic" (level -1): under this mode, RCC will attempt a very fast compression (level 1) and check if the file was sufficiently compressed. If it was, then RCC will compress again using an implementation-defined level. The following are the 4 biggest files we store as resources in qtbase: Orig Size Name 2197605 src/corelib/mimetypes/mime/packages/freedesktop.org.xml 2462423 tests/auto/corelib/tools/qchar/data/NormalizationTest.txt 6878748 tests/auto/other/qcomplextext/data/BidiCharacterTest.txt 7959972 tests/auto/other/qcomplextext/data/BidiTest.txt The current RCC (zlib, level -1 "default" and level 9), produces for those files: L(-1) Compr. L9 Compr. Decomp. Name Ratio CPU time Ratio CPU time CPU time BidiCharacterTest.txt 16.9:1 106.1ms 17.2:1 789.3ms 5.1ms BidiTest.txt 6.3:1 228.0ms 6.1:1 1646.3ms 10.9ms freedesktop.org.xml 7.0:1 17.5ms 7.1:1 53.6ms 2.6ms NormalizationTest.txt 5.8:1 41.2ms 5.9:1 256.4ms 3.4ms Zstandard produces the following for levels 1 ("check"), 14 ("store") and 19 ("best"): L1 Compr. L14 Compr. L19 Compr. Decomp Name Ratio time Ratio time Ratio CPU time time BidiCharacterTest.txt 15.8:1 8.0ms 26.1:1 168.9ms 49.2:1 2504.7ms 3.8ms BidiTest.txt 8.2:1 17.0ms 8.7:1 323.9ms 14.9:1 1700.9ms 12.1ms freedesktop.org.xml 6.7:1 4.0ms 8.7:1 63.3ms 9.5:1 642.5ms 1.7ms NormalizationTest.txt 5.7:1 5.0ms 7.5:1 54.0ms 8.4:1 447.3ms 3.0ms This shows use of zstd at the default RCC level settings always produce smaller outputs compared to the current zlib-based defaults, with roughly 50% CPU increase. It also produces better results at less CPU time than the best compression zlib has to offer. More importantly, the decompression time reduces in all cases (the numbers listed are for max compression, with slightly better results for the defaults). For the sake of comparison, the same files compressed with libxz at levels 3 and 6: Level 3 Level 6 Decompr. Name Ratio CPU Ratio CPU time BidiCharacterTest.txt 28.5:1 109.1ms 42.9:1 1390.5ms 16.7ms BidiTest.txt 10.7:1 281.0ms 18.4:1 2333.1ms 43.6ms freedesktop.org.xml 9.1:1 62.0ms 10.2:1 499.1ms 12.0ms NormalizationTest.txt 10.2:1 75.5ms 13.2:1 417.6ms 14.7ms LZMA at level 3 consumes roughly the same CPU time as Zstd at level 14 and produces incrementally smaller results, but the decompression time increases considerably. It's not a good trade-off for the Qt resource system. Change-Id: I343f2beed55440a7ac0bfffd1562d754bd71d964 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QResource: add support for resources compressed with ZstandardThiago Macieira2018-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See next commit for details on why this is a good idea. [ChangeLog][Important Behavior Changes] The Qt resource system now supports compressing content using the Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses better for the same CPU time, so this algorithm is the default. QResource::isCompressed() returns true for either compression algorithm. Use QResource::compressionAlgorithm() to find out which algorithm to decompress. QFile will automatically decompress using the correct algorithm. Change-Id: I343f2beed55440a7ac0bfffd1562e9a8f94933a7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-111-2/+2
|\| | | | | | | Change-Id: I91e684e74c36467efda8ded6ed19791baa0c1a1f
| * Do not use arc4random_buf() on GNU/kFreeBSDDmitry Shachnev2018-12-091-2/+2
| | | | | | | | | | | | | | It is not available in the GNU C Library. Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTypeInfo: use C++11 type traits to deduce if a type is static or complexLars Knoll2018-12-102-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All types that can be trivially copied and destructed are by definition relocatable, and we should apply those semantics when moving them in memory. Types that are trivial, are by definition not complex and should be treated as such. [ChangeLog][QtCore] Qt Containers and meta type system now use C++11 type traits (std::is_trivial, std::is_trivially_copyable and std::is_trivially_destructible) to detect the class of a type not explicitly set by Q_DECLARE_TYPEINFO. (Q_DECLARE_TYPEINFO is still needed for QList.) Done-with: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Change-Id: Iebb87ece425ea919e86169d06cd509c54a074282 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-042-54/+32
|\| | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
| * Fix compilation of qendian's qswap specializations on gcc 4.8Ville Voutilainen2018-11-291-6/+6
| | | | | | | | | | | | | | Task-number: QTBUG-71945 Change-Id: Icf2b75c72946f57ebffc880c9238531dea13ab5b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>