summaryrefslogtreecommitdiffstats
path: root/src/tools/rcc
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Regenerate src/*Alexandru Croitor2019-11-142-6/+6
| | | | | | | | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Regenerate everything under ./srcAlexandru Croitor2019-11-122-2/+0
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
| * | Regenerate tools projectsAlexandru Croitor2019-10-082-5/+59
| | | | | | | | | | | | | | | | | | Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
| * | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-113-5/+61
| |\ \ | | | | | | | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * \ \ Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-0/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * | | | Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * | | | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-164-64/+493
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * | | | | CMake: Re-generate bootstrap-related CMakeLists.txt filesTobias Hunger2019-03-041-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia4be80729807c6aaac5b22a0dab81a841d57bdcd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* | | | | | Cleanup code where we mixed QHash and QMultiHash iterator codeLars Knoll2020-02-031-12/+8
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Use a QMultiHash explicitly if insertMulti() is being usedLars Knoll2019-12-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards deprecating QHash::insertMulti() and clearly separating QHash and QMultiHash. Change-Id: Ic2c7665673ff00d4f2186e94850710b70330f8ba Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | | rcc: Fix namespace handling for initializerSamuel Gaist2019-12-101-7/+13
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rcc currently always writes the namespace mangling macros in both the initializer constructor and destructor. This patch add the missing handling of the --namespace option for that part of the generated code. [ChangeLog][Tools][rcc] rcc now generates correct code when using the --namespace option. Change-Id: I7e5e608eb0ad267d11d601fc69c1a87d3f655a6e Fixes: QTBUG-80649 Reviewed-by: hjk <hjk@qt.io>
* | | | rcc: Add -d option to output a Makefile-syntax depfileMarvin Scholz2019-06-291-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -d option makes rcc output a dependency file with the specified file name. The resulting dependency file is useful for make or ninja based build systems. [ChangeLog][Tools][rcc] Added -d option to generate a dependency file. Fixes: QTBUG-45460 Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-271-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| * | | | RCC: Change the default compression to ZlibThiago Macieira2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Codebases using QResource::isCompressed() and assuming it is Zlib break if zstd is enabled. So change the default back to Zlib until Qt 6.0. [ChangeLog][Important Behavior Changes] RCC's default compression algorithm was changed back to Zlib, as it was in all previous releases until 5.13.0. The default will remain Zlib for all Qt 5.x releases but will change in Qt 6.0. To activate Zstd compression for your resources, either pass the --compress-algo=zstd option to the rcc tool or add the XML attribute compression-algorithm="zstd" to the <file> tags in the .qrc file. Task-number: QTBUG-76521 Change-Id: Ief874765cd7b43798de3fffd15a9f56fd9ad1ad4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | rcc: Avoid needless use of macrohjk2019-05-282-4/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strlen on literals gets typically optimized out nowadays. Adjust callee side to handle the off-by-one between sizeof(literal) and strlen(). Change-Id: I1551f69a160922681d66024701ba1bd8f6dc03bf Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | | QRegExp include cleanupSamuel Gaist2019-04-191-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | rcc: Avoid raw string literalshjk2019-03-201-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | Subjective, but for me its easier to follow code flow if indentation is not interrupted. Change-Id: If811ba1b975189c94a671627be8eb3a1fd67aeb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* | Fix compilation with QT_NO_COMPRESSAlbert Astals Cid2018-12-211-1/+1
| | | | | | | | | | Change-Id: Iabd57782458874abbc6b553b5e255a6b614de023 Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* | 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>
* | 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>
* rcc: Add a --list-mapping option to output both resource and real pathsUlf Hermann2018-07-251-1/+17
| | | | | | | | | | | | | | | | | | The --list option outputs only the file system paths, but does not tell us where those files end up in the resource file system. This is unfortunate because the resource paths are possibly the most interesting thing to be expected from a listing of resource files. Add an option that outputs a full mapping. This is also useful for tools that need to resolve files for resource paths from outside the application using the resources. [ChangeLog][Tools][rcc] Added a --list-mapping option which shows a mapping of resource paths to file system paths. Change-Id: I0cb57fe091ef78b4a9eca8be2fc53278ae50cc11 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* rcc: don't drop entries with missing files in -list modeOswald Buddenhagen2018-05-072-13/+9
| | | | | | | | | | | | | the files may not exist _yet_. this change allows dynamically generating the resource contents. the ignoreErrors parameter is renamed to listMode and made less aggressive, to better reflect the actual usage. Change-Id: I2f6a75a23f1ef903f0d957f9a09f4df0ce2a2b35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* rcc: prune dead wildcard matching codeOswald Buddenhagen2018-03-291-32/+29
| | | | | | | | | | | | | | | | clearly, rcc was meant to support wildcard patterns in <file> entries. however, since its inception, this code was broken: the exists() check was done first, so the decomposition into path and wildcard would never happen. as actually supporting wildcards woulds just complicate matters, simply remove that dead code. on the way, re-arrange the code in a way that is advantageous for subsequent changes, and insert a case that catches non-regular file nodes (this would have previously run into the wildcard code). Change-Id: Iac1a168b844ef5b176f6cc45d6a779fde0bec6f7 Reviewed-by: hjk <hjk@qt.io>
* Allow to override resource file dateBernhard M. Wiedemann2017-11-131-1/+5
| | | | | | | | | | | | | | because some packages create resource input files at build time and thus get the build date embedded in binaries, so that they differ for each build. See https://reproducible-builds.org/ for why this matters and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Task-number: QTBUG-62511 Change-Id: I8908ac6182fab066e6ea398df2567f6d050c77e7 Reviewed-by: hjk <hjk@qt.io>
* Win: Set a proper description for the Qt toolsKai Koehne2017-07-311-0/+1
| | | | | | | | | This is shown in the file properties, and in crash dialogs. Task-number: QTBUG-61970 Change-Id: Icf12fabb7fad30638c4e94c8ea8729c9106d01d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* uic & rcc: use the public API to set the hash seedThiago Macieira2017-03-161-4/+6
| | | | | | | | Instead of relying on a private symbol exported from QtCore. Task-number: QTBUG-47566 Change-Id: I4a7dc1fe14154695b968fffd14abd2b21a18203b Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-133-13/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Make it possible to specify the RCC data version formatSimon Hausmann2017-02-283-13/+38
| | | | | | | | | | | | | | | | | | | | After commit d20773824529d191e7b483b505107dce6c1b1c3d we unconditionally write version two, but it seems useful to allow users to specify the version explicitly. Change-Id: I81d3de3d7f87318653f89bf10e3618becd8329d6 Task-number: QTBUG-58769 Reviewed-by: hjk <hjk@qt.io>
* | Use QString::asprintf(), QStringBuilder, and the multi-arg overload of ↵Alexander Volkov2017-01-122-4/+6
|/ | | | | | | | | | | | | QString::arg() ... instead of sequential .arg(const QString &) callings. It saves memory allocations and prevents unexpected results if replacing strings contain place markers. Found with clazy's qstring-arg check. Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix missing last modification time stamp in qrc contentSimon Hausmann2016-11-222-4/+43
| | | | | | | | | The time stamp is added at the end of the node information and consequently this also bumps the version. Task-number: QTBUG-57182 Change-Id: Ia10e006f28c0b168b2bcd74ed8b7098f84d10af3 Reviewed-by: hjk <hjk@qt.io>
* Use QStringBuilder more to optimize memory allocationsAnton Kudryavtsev2016-09-151-3/+1
| | | | | Change-Id: I2939ffa10496fdc59e0402a9cb54458565ccd657 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qmake/tools: port the last remaining Q_FOREACH loops and add QT_NO_FOREACHMarc Mutz2016-05-111-1/+1
| | | | | | | | | | Port the last four remaining Q_FOREACH users in qmake and uic to C++11 range-for and mark all qtbase tools (incl. qmake) as Q_FOREACH-free, using QT_NO_FOREACH. Change-Id: Ief4e5877269e7a853e4cf05e58861a448e822d3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-0/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * rcc compiler with -list on Windows (newline symbols)Timur Pocheptsov2016-04-081-0/+5
| | | | | | | | | | | | | | | | | | | | Suppress '\n' -> '\r\n' replacement done by QIODevice, on Windows fwrite to stdout will end up in such replacement, no need in \r\r\n (reported as a bug in QtQuickCompiler originally).) Task-number: QTRD-3497 Change-Id: I61010831b49e41b3e4fa6626054f9fb53c63bb8a Reviewed-by: hjk <hjk@theqtcompany.com>
* | rcc: eradicate all Q_FOREACH loopsMarc Mutz2016-01-262-5/+6
| | | | | | | | | | | | | | ... by replacing them with C++11 ramge-for loops. Change-Id: I95a91ac36c2b2bef17bf12cf7f1676653a2d807d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-213-51/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-1/+1
|/ | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* tools: mark some types movable/primitiveMarc Mutz2015-07-221-0/+1
| | | | | | | They are held in QList or QVector. Change-Id: Ic0e379560e554e5cd3de4319e402ec1655e77874 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-1/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Rcc: Do not output empty lines when listing .qrc contentshjk2015-07-081-1/+2
| | | | | | | | | | | | | | | | | | Previously, directory nodes in the resource tree generated empty file names in the --list output. They do not add value. Change-Id: I04ac495ba5f57802de9796ec663c28facfee89f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Warta
* | rcc: make qt_rcc_compare_hash a functorMarc Mutz2015-07-131-5/+9
|/ | | | | | | | This allows the compiler to inline the function call into the std::sort instantiation. Change-Id: If2b948c1d7202d6a81afd8a58cc9fab50a9709c1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Update copyright headersJani Heikkinen2015-02-113-21/+21
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-291-0/+1
|\ | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| * rcc: fix build failure on Windows XP / MinGW 4.9Giuseppe D'Angelo2015-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The code makes usage of _fileno without including the appropriate header, which is stdio.h according to Microsoft: http://msdn.microsoft.com/en-us/library/zs6wbdhx%28v=vs.120%29.aspx Task-number: QTBUG-43900 Change-Id: Ic9d407c66243d64823353a1c7e79cf0825c735db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>