summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qconfig-bootstrapped.h
Commit message (Collapse)AuthorAgeFilesLines
* Bootstrap: remove QTemporaryFileThiago Macieira2024-03-131-1/+1
| | | | | | | | | Done by harmonizing the use on the QT_CONFIG(temporaryfile) macro and fixing one test that was missing. We can't remove the older macro because it is marked PBULIC) but we don't need to use it ourselves. Change-Id: I01ec3c774d9943adb903fffd17b7eb4dd1a4e63f Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Bootstrap: remove QVariantThiago Macieira2024-03-131-0/+1
| | | | | | | | | I added QT_NO_VARIANT to qconfig-bootstrapped.h to be clearer on what the #ifs are, but there's no testing of that feature outside of QT_BOOTSTRAPPED. Change-Id: I01ec3c774d9943adb903fffd17b7e8ac4340fb89 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: remove check for statx() and replace with STATX_BASIC_STATSThiago Macieira2023-08-031-5/+0
| | | | | | | | | | We were already using this in qfilesystemengine_unix.cpp. In fact, the only place where we had QT_CONFIG(statx) was in minimum-linux_p.h. Saves 350 ms of CMake time. Change-Id: Ifbf974a4d10745b099b1fffd177756e2edf2bf3e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: remove test for cxx11_randomThiago Macieira2023-08-021-1/+0
| | | | | | | | | | | Everyone has it, without exception. QRandomGenerator uses the Mersenne twister without checking, so you can't have Qt without this. This test was here only to produce an error at CMake time instead of at build time, but that test costs 650 ms for everyone running CMake without cached results. Change-Id: Ifbf974a4d10745b099b1fffd177753b6d4fc89d4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use the real qconfig.h in the bootstrapped configThiago Macieira2023-01-111-1/+2
| | | | | | | | | We merely replace the QtCore bits now. Change-Id: I76216ced393445a4ae2dfffd17297e31e23cca10 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFileSystemEngine/Unix: remove futimes related codeAhmad Samir2022-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | - futimes isn't a standard system call[1]: « This system call is nonstandard. It was implemented from a specification that was proposed for POSIX.1, but that specification was replaced by the one for utimensat(2). A similar system call exists on Solaris. » [1] https://man7.org/linux/man-pages/man2/futimesat.2.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html - futimens is a standard system call[2], it's available on: - Linux: https://man7.org/linux/man-pages/man2/futimesat.2.html - FreeBSD: https://www.freebsd.org/cgi/man.cgi?query=futimens&sektion=2&n=1 - OpenBSD: https://man.openbsd.org/futimens.2 - QNX: https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/f/futimens.html So, remove futimes related code. Change-Id: I58ac466f08161a88219e3a32eab98d168f065140 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live QPermissions!Tor Arne Vestbø2022-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many features of today's devices and operating systems can have significant privacy, security, and performance implications if misused. It's therefore increasingly common for platforms to require explicit consent from the user before accessing these features. The Qt permission APIs allow the application to check or request permission for such features in a cross platform manner. The check is always synchronous, and can be used in both library and application code, from any thread. The request is asynchronous, and should be initiated from application code on the main thread. The result of the request can be delivered to lambdas, standalone functions, or regular member functions such as slots, with an optional context parameter to manage the lifetime of the request. Individual permissions are distinct types, not enum values, and can be added and extended at a later point. Task-number: QTBUG-90498 Done-with: Timur Pocheptsov <timur.pocheptsov@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I821380bbe56bbc0178cb43e6cabbc99fdbd1235e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Bootstrap: explicitly include stdlib.h to check for __GLIBC_PREREQIvan Solovev2022-10-061-0/+2
| | | | | | | | | | | | | | | | Previously the code was relying on the includes in qglobal.h, but now when we try to get rid of qglobal.h we can end up in a situation when qconfig-bootstrap.h was first included before qglobal.h (__GLIBC_PREREQ not defined), and also included once again after qglobal.h (__GLIBC_PREREQ defined, at least on linux). This resulted in redefenition of Qt features dependent on __GLIBC_PREREQ. This patch fixes it by explicitly including the stdlib.h header which will provide __GLIBC_PREREQ definition when it is available. Task-number: QTBUG-107046 Change-Id: Idbf7a11151c5f81723131daf25c06ef454ff5cbb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove QTemporary(file|dir) from boostrap libFabian Kosmale2022-03-231-0/+2
| | | | | | Change-Id: I851f0fd8150592784a7b38d3d30d69d8346de112 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove QT_FEATURE_sharedmemory from qconfig-bootstrapped.hJoerg Bornemann2022-02-101-1/+0
| | | | | | | This amends commit 75082c9f20271eb7916a7e8e85d2e58b8e4b1392. Change-Id: Idd1f9a8cd86c1d265d20917594fbeea26f1f8bf2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QSystemSemaphore from bootstrap libJoerg Bornemann2022-02-091-1/+0
| | | | | | | | This class is used by androidtestrunner, which is not bootstrapped. Change-Id: Ie75b4dd039f773a8ccb58f243bf9f74a5121c3f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace cxx17_bm_searcher config check with feature test macroMarc Mutz2022-01-241-1/+0
| | | | | | | | | | This enables the code also for boostrap. Amends b24e689cb561d81745ff47a5ce4595b809923914. Pick-to: 6.3 Change-Id: I8efc76c20690282a2428f360d6b93896966b97ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove zlib from bootstrap libraryJoerg Bornemann2021-10-161-0/+2
| | | | | | | | | None of the bootstrapped tools use zlib anymore. Change-Id: I2cd7cb855ed671916a21c23449d9b6c4506f8546 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: optimize indexOfMårten Nordheim2021-06-111-0/+1
| | | | | | | | | | Some time ago I wanted to use QStringTokenizer with a QL1S haystack and needle to optimize a particular bottleneck. Only to realize the new bottleneck was more expensive (continuously converting both the strings to QString). Change-Id: Ica86db0043c839c2336a3c3886ffbe3875659b5b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* fix build for no feature futureLorn Potter2021-05-121-0/+1
| | | | | | | | | | | This amends afd7460affa17b5f8aac9034b1b9c3b13dd115f7 Add new app permissions API under QCoreApplication Which added QFuture use without protection for platforms with no real future. Change-Id: Iac50a71c9821255621d7582481270b2023610405 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add Solaris support in cmake buildNiclas Rosenvik2021-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add SOLARIS cmake platform definition. Add settings for QT_DEFAULT_MKSPEC so that qplatformdefs.h can be found. Solaris has its gssapi symbols in libgss. Solaris supports @ORIGIN. Solaris ld does not support --dynamic-list needed for reduce relocations. Make solaris fail the reduce relocation test. getauxval is specific to GNU libc and some other libc implementations on Linux but sys/auxv.h is not. The bootstrap uses sys/aux.h as the only indication for getauxval. This breaks builds on Solaris, so only make sys/auxv.h an indicator for getauxval on linux or glibc based systems. Solaris uses X11 so add it to the X11_SUPPORTED list. Solaris network libraries for sockets etc are in socket and nsl. ifreq does not have a member ifr_ifindex on Solaris, it uses ifr_index. Add test to check if ifr_index is a member of ifreq. The first struct in the in_addr union on solaris is defined as four uint8_t, therefore four arguments are needed for its initializer list. Change-Id: Ieed4c1bbac8559a7ae1db9c4e1e91f609f150270 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build of Core module without regularexpression featureAlexey Edelev2021-03-041-2/+0
| | | | | | | | | | | | | | | | | | qregularexpression.h requires FEATURE_regularexpression to be enabled. Add a condition to the 'qt_pch.h' header to fix the build when PCH are enabled and FEATURE_regularexpression is disabled. It seems that the filter implementation of QSortFilterProxyModel has QRegularExpression as its base. It's necessary to make sortfilterproxymodel dependent on the regularexpression feature. Fix the precompiler condition for the extractSections function in the QString implementation. Use the same precompiler condition for the QString::section and extractSections functions, since QString::section depends on extractSections. Change-Id: I5b775e0842a0aa1a8d47f8dded376bdfcf63b5bf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use Core library for qmake instead of the Bootstrap libraryAlexey Edelev2021-02-251-10/+0
| | | | | | | | | | | | | | | | | | | Move the qmake-specific logic of the QLibraryInfo class to qmake internals. 'qconfig.cpp.in' now stores information about the library info entries to keep them consistent between qmake and the Core library. qmake requires specific features enabled in the Core library, so building qmake will be skipped if the features are not enabled. All flags directly related to the qmake have been removed from Core lib. Remove all bootstrap related sections from qmake CMakeLists.txt Task-number: QTBUG-89369 Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove deprecated binary json featureEdward Welbourne2020-07-311-1/+0
| | | | | | | | | Deprecated in 5.15 in favor of CBOR. Fixes: QTBUG-81239 Change-Id: I711d4bd7dd1247f58e77ac9fa53304cbe5028918 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QTextCodec support out of QtCoreKarsten Heimrich2020-06-201-3/+0
| | | | | | | | | | * Assume UTF-8 on all Unix like systems * Export some functions to be able to compile QTextCodec once moved to Qt5Compat. Task-number: QTBUG-75665 Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the UTF conversion methods to qstringconverterLars Knoll2020-05-141-3/+2
| | | | | | | | | | | | | | Separate them from the qutfcodec, so that the codec can later on be moved out of Qt Core. Fix the QUtf methods to take qsizetype instead of int for length arguments. This also makes it possible to not build QTextCodec into the bootstrap lib anymore. Change-Id: I0b4f83139d61b19c651520a2f3a5012aa7e85cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QRegExp from the bootstrap libraryLars Knoll2020-05-061-0/+4
| | | | | | | All it's uses have been replaces with QRegularExpression. Change-Id: I5bcdfdd8a39dad6d1288f18f1b24d2eea9e028d2 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Compile QRegularExpression into qmakeLars Knoll2020-05-051-4/+0
| | | | | | | | This is required to be able to port qmake over to use QRegularExpression instead of QRegExp. Change-Id: I0ad2c19bf3c0a28e52c1e12b4d3daa0300a75ed2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include QRegularExpression in the bootstrap libraryLars Knoll2020-04-131-0/+4
| | | | | | | | This allows us to use regular expressions in bootstrapped tools such as moc and tracegen. Change-Id: I4310dd15bf26651aac6ab30c884e025ca06b3099 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce a configure-time check for C++17 filesystemMårten Nordheim2020-02-071-0/+1
| | | | | | | | | Various compilers have various fun ways of failing to compile when it is used so let's check if they will work properly during configure rather than much later. Change-Id: Ia93d4b91b3d269b4cab2a5f677c3c89e06b44ce3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * Split cborstream feature in twoUlf Hermann2019-12-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading of Cbor streams is substantially more complicated than writing as it requires float16 support. When writing Cbor, we can just choose to always write 32bit floats, even if we could compress the numbers into 16 bits. We need Cbor writing in the bootstrap library, but we cannot easily add float16 support. Furthermore, Cbor reading is required for plugin support, but not Cbor writing. It might make sense for some users to build a custom Qt with Cbor writing disabled. Therefore, provide two features, cborstreamreader and cborstreamwriter, split up the code in cborstream.{h|cpp} into several files, and enable Cbor writing in the bootstrap library. Change-Id: I15450afb0e328a84a22ebca9379cffc4f900a75a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-111-2/+2
|\| | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-101-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | * Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-0/+1
|\| | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | Reimplement JSON support on top of CborUlf Hermann2019-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In turn, deprecate the QJsonDocument methods that deal with JSON binary data. You should use CBOR for data serialization these days. [ChangeLog][Deprecation Notice] The binary JSON representation is deprecated. The CBOR format should be used instead. Fixes: QTBUG-47629 Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QShortcut: Properly port to the new configure systemFriedemann Kleint2019-10-251-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the feature to corelib so that the QMetaType enumeration values can be properly excluded and there is no need for a dummy class. Use QT_REQUIRE_CONFIG in the headers of classes to be disabled. Add headers/source files in the .pro file depending on the configure feature in libraries and tests. Add the necessary exclusions and use QT_CONFIG. Task-number: QTBUG-76493 Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* / Provide a feature for CBOR stream I/OUlf Hermann2019-10-161-0/+1
|/ | | | | | | We need to turn it off in bootstrap code. Change-Id: I826e49fbc5f6128e56f84b58d29358dd7b0b9dc5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Featurize support for signaling NaNEdward Welbourne2019-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | One of our compilers for emscripten coerces all signaling NaNs to quiet ones, so won't do any actual signaling. Anyone relying on them to do so shall be disappointed, so it's better that they know about it at compile-time - or, at least, have the ability to find it out. Put the signaling NaN producers (and remaining (test) code using them) under the control of a feature that's disabled when numeric_limits claims double has no signaling NaN. Assume the bootstrap library doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no contexpr way to test that alleged signalling and quiet NaNs are actually distinct. Added some auto-tests for signaling NaN, including that it's distinct from quiet NaN. Any platform on which the last fails should disable this feature. Task-number: QTBUG-77967 Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add support for the Islamic Civil calendarSoroush Rabiei2019-08-221-0/+2
| | | | | | | | | | | | | | | | This has its own locale data, extracted from CLDR. This data may potentially be shared with other variants on the Islamic calendar, so is handled by a separate base-class, QHijriCalendar, on which such variants may base their implementations. [ChangeLog][QtCore][QCalendar] Added support for the Islamic Civil calendar, controlled by feature islamiccivilcalendar, with locale data that can be shared with other implementations, controlled by feature hijricalendar. Fixes: QTBUG-56675 Change-Id: Idf32d3da7034baa8ec5e66ef847e59a8a2f31cbd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add support for the Jalali (Solar Hijri or Persian) calendarSoroush Rabiei2019-08-211-0/+1
| | | | | | | | | | | | This has its own locale data, extracted from CLDR. [ChangeLog][QtCore][QCalendar] Added support for the Jalali (Persian or Solar Hijri) calendar, controlled by feature jalalicalendar. Fixes: QTBUG-58404 Change-Id: Id5c56a10db05a4fd612aafc01615273db81ec743 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce a new feature called easingcurveTasuku Suzuki2019-08-161-0/+1
| | | | | | | | | | features.animation and features.scroller depend on the feature. In total, this saves around 180KB from QtCore and 75KB from QtWidgets. Change-Id: I65aac3ec4d50d62424ee33f44b99f3cfb91121d6 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@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>
* Correct QT_FEATURE_settings in qconfig-bootstrapped.hLiang Qi2018-11-201-1/+0
| | | | | | | This amends 4d180586cddbd71a67c83246db3bec1caa595e05. Change-Id: Ia008e618f726f113f84cf4caa8d5f30442dbbb64 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-191-0/+2
|\ | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| * Modernize the "settings" featureLiang Qi2018-11-151-0/+2
| | | | | | | | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-091-1/+0
|\| | | | | | | | | | | | | | | | | | | 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-071-1/+0
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-1/+0
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Modernize the "codecs" featureLiang Qi2018-10-121-1/+0
| | | | | | | | | | | | Change-Id: Idee19112581bff64a2e0b8e331dd3d779aca165b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+3
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| * Modernize the "datestring" featureLiang Qi2018-09-241-0/+1
| | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>