summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/collectjson.cpp
Commit message (Collapse)AuthorAgeFilesLines
* moc: Do not accept empty input files on --collect-jsonUlf Hermann2025-02-211-2/+4
| | | | | | | | ... and also don't generate them on --output-json. That was an invitation for build time race conditions. Change-Id: I206ee47f08aa657f9b1cbec4e9e9b3ea97605cae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Prefix messages from --collect-json with file namesUlf Hermann2025-02-211-12/+12
| | | | | | | | Unless we're reading from stdin or writing to stdout, in which case there are no file names. Change-Id: I583fe2a77f54c5d62d965384a2c316f37a9b2fd2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-1/+1
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+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>
* Avoid blocking read from stdin when collecting json filesAlexey Edelev2021-05-311-2/+2
| | | | | | | | | | | Change the behavior of moc when collecting json files. If argument files are specified, suppose moc received empty input and skip input from standard input. Pick-to: 6.1 Fixes: QTBUG-93504 Change-Id: I45ec790ed458f1fae543d069555bc8abc6560816 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Deprecate qGlobalQHashSeed and qSetGlobalQHashSeed in Qt 6.6Thiago Macieira2021-05-231-1/+1
| | | | | | | That's two years from when the replacements were added (6.2). Change-Id: Id2983978ad544ff79911fffd1671f7dd38fede02 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Moc Sort json file list in collectjsonLeander Beernaert2019-11-271-1/+3
| | | | | | | | | This patch ensures that the list of input files are sorted before being collected. This provides consistency when comparing results generated from the CMake port which do not have the same order as qmake. Change-Id: I46e3acf7c26dfd21fd0c1196bdeddf22acbf6ba5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add support for machine-readable JSON output to the MOCSimon Hausmann2019-10-041-0/+103
The --output-json parameter will make moc produce a .json file next to the regular output file. With --collect-json the .json files for a module can be merged into a single one. Task-number: QTBUG-68796 Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>