summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* moc: Fix parsing of [[deprecated]] enum valuesOliver Wolff2019-03-111-0/+1
| | | | | | | | | | | | | | | | moc now successfully parses enum values, that have been deprecated with [[deprecated]]. This is valid c++17 and should be handled correctly. By adding that functionality it is possible to parse Windows headers which use this deprecation mechanism. To make sure, that moc works correctly even on compilers that do not support deprecated enum values yet, the auto test explicitly uses [[deprecated]] enum values during moc run. Fixes: QTBUG-74126 Change-Id: I7b9d9a49af6093a97f8fdb800ffbc5af3d54d262 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* rcc: Support Python as output formathjk2019-03-073-26/+197
| | | | | | | | | | | | Start with rcc -g python|python2 $name.qrc. [ChangeLog][rcc] Added support for Python as output format. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Fixes: PYSIDE-855 Change-Id: I97a642c3721d6d95b7cd0972d21abb0b2752fd4f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add support for C++ functions attributes in mocJędrzej Nowacki2019-03-072-3/+19
| | | | | | | Done-with: Ryan Chu <ryan.chu@qt.io> Change-Id: Id7f2ba35ccea79e0a0c316ca2736101b8cd57f97 Fixes: QTBUG-58628 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QString: mark obsolete functions as deprecatedChristian Ehrlicher2019-03-041-25/+20
| | | | | | | | | | Mark obsolete functions in QString as deprecated so they can be removed with Qt6: - QString::sprintf() - QString::vsprintf() Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-221-4/+13
|\ | | | | | | Change-Id: I4b56ce8c76729d9fc60995564299f8f27336fcde
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-211-4/+13
| |\ | | | | | | | | | Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
| | * Add translatable attribute to the app_name string to fix a lint warningLars Schmertmann2019-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incomplete translation ---------------------- If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages. If the string should not be translated, you can add the attribute translatable="false" on the <string> element, or you can define all your non-translatable strings in a resource file called donottranslate.xml. Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute. Change-Id: I6f93f34fc36a06de9a0b687a93cf58df941dbbcb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * Kludge popen/pclose calls on MS-WinDmitry Sokolov2019-02-191-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | For MS Visual Studio we need to use _popen() and _pclose() instead of the POSIX functions; and the pipe needs to be opened in binary mode. Change-Id: Ide0fb26a1e5f121b384b0baaf8100f26c614ccc6 Fixes: QTBUG-73810 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | moc: Parse namespaces from other filesUlf Hermann2019-02-212-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can parse the namespaces in order to find the enums in them and populate the related metaobjects of the current file's classes. The symbol clashes are avoided by only generating metaobjects for namespaces defined in the same file. Fixes: QTBUG-71966 Fixes: QTBUG-72069 Change-Id: Ibdf21c3f9dae48d95b0952b3e220b4c29e30ecb8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-202-2/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-191-1/+1
| |\| | | | | | | | | | Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
| | * Add cmdline feature to qmakeJoerg Bornemann2019-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-1/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-061-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I486f3c51df4b60fe60b75ba642636a835a75f731
| | | * Fix llvm-strip errorv5.12.1BogDan Vatra2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In NDKr19 they removed "-strip-all-gnu" argument, now llvm-strip prints tons of: .../llvm-strip: error: unknown argument '-strip-all-gnu'. Change-Id: I11bb2d6abcc5f236730c57b5b93cc932c7ba58c6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | qmake: Add variables for setting the version number and name in AndroidAndy Shaw2019-02-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it much easier to have the version information set for an Android APK without having to manually modify the AndroidManifest.xml each time. [ChangeLog][Android][qmake] Can now set the version name and code for Android using ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively in the pro file. Change-Id: Ie6813bc3a7444f7baa5e772b93bc2695d9b81e57 Done-with: Markus Maier <markus.maier@rosenberger.de> Reviewed-by: Markus Maier <markus.maier@rosenberger.de> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | Remove eval modeKai Koehne2019-02-121-2/+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>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-262-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| |\| | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-082-2/+19
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | * | Bump copyright year to 2019Kai Koehne2018-12-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-72635 Change-Id: Idc9bd97fe873b332d7ff72cb44a00334a472404f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | uic: Fix broken icon code generationFriedemann Kleint2019-01-231-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change b86d0b62156993936bf93169a895a92ad60adf7d rearranged the sequence of function calls when generating code adding QTabWidget and QToolBox pages, not taking into account that the iconCall() has a side effect (writing out icon definition) Revert that part and add a comment. Fixes: QTBUG-72980 Task-number: PYSIDE-797 Change-Id: Ie8fbaa36f21cd4408fb1f491195da5c260708e6c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | | Android: Set minimum supported version to android-21Eskil Abrahamsen Blomfeldt2019-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current distribution, this is 90% of active devices, and it was released in 2014. Qt 5.12 is LTS and will continue to support older Android versions for a long time to come. This is to reduce the testing needed on outdated platforms and allow ourselves to use some newer APIs unconditionally in Qt. Android 21 was chosen because it is the minimum version that supports 64 bit builds. [ChangeLog][Android] Increased the minimum supported Android version to Android 5.0 (API level 21). Fixes: QTBUG-70508 Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-211-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | | Add the command line option --no-strip to androiddeployqtJoerg Bornemann2019-01-161-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are certain use cases for keeping debug information on the device, for example collecting stack traces when the app crashes. [ChangeLog][Android] Added the --no-strip command line option to androiddeployqt. Change-Id: I96574c2c57d85fb23d5fc65380e471fa892b6543 Fixes: QTBUG-57771 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | uic: Refactor CustomWidgetsInfo::extends()Friedemann Kleint2019-01-105-42/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a extendsOneOf() helper that takes a QStringList to be searched and simplify the code accordingly. In WriteInitialization::acceptWidget(), move the variable CustomWidgetsInfo *cwi up and reuse everywhere to shorten code. Task-number: PYSIDE-797 Change-Id: I331e135b6aa58dbbd413ca151eb67b3eb92f09c6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | moc: add support for C++11 enum structSamuel Gaist2018-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 added the new enum class key as well as enum struct. While the former is likely the most known and used, the later can be used in the same contexts and with the same effects. Currently moc doesn't parse enum struct while it does for enum class. This patch fixes this. [ChangeLog][moc] moc now parses enum struct the same way as enum class therefore that keyword can be used with the Q_ENUM macro as well as Q_FLAG and Q_DECLARE_FLAGS. Change-Id: Iaac3814ad63a15ee4d91b281d451e786b510449c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix compilation with QT_NO_COMPRESSAlbert Astals Cid2018-12-211-1/+1
| | | | | | | | | | | | | | | Change-Id: Iabd57782458874abbc6b553b5e255a6b614de023 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Qt Forward Merge Bot2018-12-151-1/+18
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-151-1/+18
| |\| | | | | | | | | | | | | | Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
| | * | uic: Generate version check macros around newly introduced palette color roleFriedemann Kleint2018-12-141-1/+18
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ebd3a13b807c6af2684b42d3912549caf7ef82aa introduced a new QPaletter::PlaceholderText color role which causes the uic-generated code not to compile when using Qt Designer embedded in Qt Creator with older (5.9 LTS) kits. Generate a version check macro to fix this. Change-Id: I6d9f7edb0c6047c2f64ef3357b29f91655c52aac Fixes: QTBUG-72555 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | / Repack some classes in Moc to avoid padding holesThiago Macieira2018-12-141-38/+34
|/ / | | | | | | | | Change-Id: I8f261579aad648fdb4f0fffd155385477abadf9e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | rcc: Use SOURCE_DATE_EPOCH for mtimeBernhard M. Wiedemann2018-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the standard variable name in addition to the QT-specific one to make builds reproducible out-of-the-box. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Task-number: QTBUG-62511 Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | uic: Refactor DOM class lookup in class DriverFriedemann Kleint2018-12-133-61/+54
| | | | | | | | | | | | | | | | | | Change the API to take const Dom * classes and use a helper function to do the insertion. Task-number: PYSIDE-797 Change-Id: I079f5c92bae85d6246c14077db06e381b572cda5 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | uic: No longer generate static_cast for enum values in legacy formsFriedemann Kleint2018-12-133-24/+111
| | | | | | | | | | | | | | | | | | Add a lookup for the affected enum values and use the names instead. Task-number: PYSIDE-797 Change-Id: I6be166409000aff83d9465c9a3b2f37b44c5c085 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Resources: reject compressed content we can't decompressThiago Macieira2018-12-123-12/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solution is composed of two features: 1) C++ code generated by RCC uses two symbols exported from QtCore that are only present if the feature was compiled in. If the feature was not compiled in, this will cause a linker error either at build time or at load time (if they were functions, the error could be at runtime). 2) Binary files generated by RCC have a new header field containing flags. We're currently using two flags, one for Zlib and one for Zstandard. This means we now have binary RCC format version 3. Change-Id: I42a48bd64ccc41aebf84fffd156545fb6a4f72d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | uic: Small refactoringsFriedemann Kleint2018-12-127-120/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not use QString::number() to stream numbers. - Do not use QLatin1String/Char to stream strings or characters. - Add a convenience methods to determine the container page add method for simple containers. - Similarly, extract a method to determine the layout method and simplify the code accordingly. - Fix Clang warnings about else if after return/continue. - Use QString::isEmpty() instead of size() to check emptiness. - Fix QHash-contains()/value() Antipattern Task-number: PYSIDE-797 Change-Id: I9c61d20f46c8d142b947126a27faaf54b41f9e0c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-122-2/+2
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Handle errors in moc generate.sh scriptJędrzej Nowacki2018-12-121-0/+2
| | | | | | | | | | | | | | | | The script was happily ignoring all errors, relaying on a user reading output. Change-Id: I85edd228a40b5459c4649ab0c0bbbe3042a3abf5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | RCC: introduce compression algorithm "best"Thiago Macieira2018-12-112-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compression algorithm is permitted in the XML sources, which instructs RCC to apply the best compression algorithm it has available. If we have Zstandard available, that's its level 19 (levels 20 and up are experimental). If not, we apply zlib compression level 9. And apply this technique for the XDG MIME database that is built-in to QtCore. Payload size Compr. time Previously 313916 17.9ms Zlib -9 310899 53.6ms Zstd -14 253364 63.3ms (plus 4.0 ms on L1 heuristic check) Zstd -19 230647 642.5ms Change-Id: I343f2beed55440a7ac0bfffd1562de44dbaf09cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | RCC: Add support for Zstandard compressionThiago Macieira2018-12-114-3/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | RCC: Modernize the compression algorithm selectionThiago Macieira2018-12-113-24/+123
| | | | | | | | | | | | | | | | | | | | | | Instead of using compression level -2 to indicate no compression, introduce CompressionAlgorithm::None and an equivalent XML attribute. This commit includes some extra error checking for RCC. Change-Id: I343f2beed55440a7ac0bfffd1562d64b024463ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QtDbus: Remove unused QStrings [-Wclazy-unused-non-trivial-variable]Sergio Martins2018-12-101-3/+0
| | | | | | | | | | Change-Id: Iea776554aa5e01ecc6fa08ac2c8fb7b720d57126 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a few qAsConst() to range-for to prevent detachmentsSergio Martins2018-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | places indicated by clazy As a drive-by, fixed minor styling issues in the affected lines. Change-Id: I88d3fc0c8573cde0e61f19a18dd9ea697ee40c34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]Sergio Martins2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>) corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue) gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant) tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name) Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | uic: Generate correctly qualified invocation of QCoreApplication::translate()Friedemann Kleint2018-12-031-1/+1
| | | | | | | | | | | | | | | | | | Change QApplication::translate() to QCoreApplication::translate() in generator and tests. Task-number: PYSIDE-797 Change-Id: I0bbaf1f280b74b3b2a701a39203c059ab82fce1f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | uic: Remove unused codeFriedemann Kleint2018-12-0311-168/+1
| | | | | | | | | | | | Task-number: PYSIDE-797 Change-Id: I6958ad76c138dcb4126cda8b26f23311963d6d37 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Compile with QT_STRICT_ITERATORS definedLars Knoll2018-11-261-0/+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>