summaryrefslogtreecommitdiffstats
path: root/src/tools/qdbuscpp2xml
Commit message (Collapse)AuthorAgeFilesLines
* Tools: handle file opening failureGiuseppe D'Angelo2024-04-141-6/+14
| | | | | | | | | Most of the cases, a file handle (stdin/out) is opened without checking for error. That operation may still fail, so check for it. Change-Id: I30c3e7b40858acd8b1662622129bd6557722dccd Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbuscpp2xml: Register QtDBus metatypesIevgenii Meshcheriakov2023-11-281-0/+3
| | | | | | | | | | | | Explicitly register QtDBus-specific metatypes before attempting to generate output. This fixes a bug when types like QDBusObjectPath are sometimes ignored by this tool. Export QDBusMetaTypeId::init() for that reason. Add a regression test to tst_qdbuscpp2xml. Fixes: QTBUG-34550 Change-Id: I16faa79a794d09a26bad45e18730379681a20b50 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix registration of QtDBus types' metatypesThiago Macieira2023-08-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | By actually registering them. Commit 850d850c5af8ff77a4b9d53457ec6b1ba6c20cb3 changed from qMetaTypeId<QDBusArgument>() to QMetaType::fromType<QDBusArgument>() and in Qt 6, fromType() does not register the type with the database. That means the lines became runtime no-ops at that time or during the QMetaType updates since 6.0. All they did was instantiate the C++ inline variable. The testing also detected we didn't register QList<QDBusVariant> as an alias for the "av" signature. I'm not entirely sure you're allowed to use this because QtDBus does not like re-registration of the built-in types, and "av" is already assigned to QVariantList. This is no trouble for the parser, anyway. Minor change to qdbuscpp2xml to allow reading from stdin, so we don't have to create temporary files. Pick-to: 6.5 6.6 Fixes: QTBUG-115964 Change-Id: I80612a7d275c41f1baf0fffd177a14925e7d23ac Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* qdbuscpp2xml: Support MEMBER field of Q_PROPERTYIevgenii Meshcheriakov2023-08-031-0/+2
| | | | | | | | | | | | | Emit properties with MEMBER field specified with 'readwrite' access. Previously only READ and WRITE filed where used for deriving the access value. Add a property using MEMBER to the test class used by tst_qdbuscpp2xml. Fixes: QTBUG-115631 Change-Id: I12351985a9fafd934ccc5e0b805077a9e44b6608 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add TRY_RUN_FLAGS argument to customize the TRY_RUN commandAmir Masoud Abdol2023-06-151-0/+1
| | | | | | | | | | | | | | | | | | Some of our tools don't have the `-h`, or `-v` flag, or it could be that the `-v` flag also prints the entire `--help` as well, e.g., `androiddeployqt`. When running in Jenkins, this may lead to a message box being shown and consequently stopping the build. By customizing the flag per tool, and limiting the TRY_RUN to tools that support `-v` or `--version`, we can avoid this. Also removed TRY_RUN from `macdeployqt` which doesn't need it anyway. Amend 41b32cd2c4706fa280fc779d5dec132ee9edf0f6 Pick-to: 6.5.2 6.5 6.6 Fixes: QTBUG-114530 Change-Id: I78e3344d2553c0050c285ae86f2310bd373c6c57 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add TRY_RUN to host toolsAmir Masoud Abdol2023-06-081-0/+1
| | | | | | | | | | | | On Windows, we will try to run our host tools after a successful build. If the build fails because of a missing DLL, we will be able to throw an error with some direction on what might be the cause, and how to resolve it. Pick-to: 6.5 6.6 Fixes: QTBUG-113273 Change-Id: Iba548829bc41fbee95cef288faaf7edca118ee33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Centralize copyright information for QtKai Köhne2023-03-201-1/+1
| | | | | | | | | Maintain one central place - .cmake.conf - for information about Qt's copyright. Pick-to: 6.2 6.5 Change-Id: Ibcbce4313eba9660d459061b0ad00307e267b8f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update Copyright year to 2023Kai Köhne2023-03-201-1/+1
| | | | | | Pick-to: 5.15 6.2 6.5 Change-Id: I8812bf2523ccb715407181aec6aebf2034c8ff84 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-101-20/+1
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* 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>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for executablesAlexandru Croitor2022-07-251-1/+1
| | | | | Change-Id: I5648fbed3542395e65f86e35825b1b50f824133e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* qdbuscpp2xml: Finish migration to qsizetypeMate Barany2022-07-071-6/+4
| | | | | | | | Inspect and change int types to qsizetypes where necessary. Fixes: QTBUG-103550 Change-Id: Ib92553ab214d06c8daecaa0c48ae2c2e4e32fdb7 Reviewed-by: Marc Mutz <marc.mutz@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>
* Tools: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-05-031-6/+6
| | | | | | | Task-number: QTBUG-98434 Change-Id: Ie136f600f823019c29461561d4e30be66a66e87b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tools: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-031-13/+13
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I6d4712a71b5ebf3f379f1f98ea476557bce963ef Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tools: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-05-021-4/+4
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Ib9e01ede4e0d7869fc95414d36f37df4a30b16b4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Deprecate {QString, QByteArray}::count()Sona Kurazyan2022-03-121-1/+1
| | | | | | | | | | | | And remove their uses. [ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count() and QByteArray::count() that take no parameters, to avoid confusion with the algorithm overloads of the same name. They can be replaced by size() or length() methods. Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year to 2022Kai Köhne2022-01-041-1/+1
| | | | | | | Pick-to: 5.15 6.2 6.3 Change-Id: If6f1d6f9f82a601f8e2b6d36650d6e737518aa60 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Skip unnecessary commands when cross-building toolsJoerg Bornemann2021-09-271-0/+1
| | | | | | | | | | | | | | | Introduce a new macro qt_internal_return_unless_building_tools which simply calls return() if tools are not built. This macro is supposed to be called after qt_internal_add_tool(). Using this macro avoids having to special-case code for when qt_internal_add_tool() creates imported targets in cross-builds. Adjust pro2cmake accordingly. Task-number: QTBUG-85084 Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qdbuscpp2xml: add support for custom types with a new -t optionDavid Faure2021-08-251-8/+66
| | | | | | | | | | | | | | | | | qdbuscpp2xml can't know about custom types registered with qDBusRegisterMetaType<> in the server application whose header file it's parsing. So add support for custom types using a command line argument. For example: qdbuscpp2xml -t 'std::vector<Person>=a{ssss}' peopleserver.h which generates <arg name="people" type="a{ssss}" direction="in"/> <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="std::vector&lt;Person&gt;"/> [ChangeLog][QtDBus][qdbuscpp2xml] Added a -t option to specify how to handle custom types. Change-Id: Ic0cad4f4eec8d5dfa48055c3a46cc772b1a60174 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Bump copyright year to 2021Kai Köhne2021-01-251-2/+2
| | | | | | Change-Id: I18a9c2de391ca51655148b2e3cc9abdfbb8ddbcf Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-47/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-13/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Use QMetaType instead of integer based type idsLars Knoll2020-09-231-8/+8
| | | | | | | | | Change the implementation of Qt DBus to use QMetaType directly instead of integer based type ids. Change-Id: I999023b58fa50dcc3504386467faf09874f7d2cf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-232-6/+6
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use QMetaType in QMetaCallEventLars Knoll2020-08-241-3/+3
| | | | | | | And don't use int based type mapping anymore. Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-071-5/+4
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in other toolsJarek Kobus2020-06-251-5/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: I90d0e2e723bb4d205d7bf333b21cdf583fdf4ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Make it possible to build tools when cross-compilingLeander Beernaert2020-06-022-5/+6
| | | | | | | | | | | | | | | | | | | This patch allows tools to be built for the target platform when the QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration time. To avoid naming conflicts, the target tools are suffixed with "_native". The qt_get_tool_target_name() function can be used to get the tool name for both scenarios (cross and non-cross compilation). Extend pro2cmake to refer to the right target name for tools. The relevant write_XXX functions have a new target_ref parameter that will be "${target_name}" for tools and literally the target name for everything else. Fixes: QTBUG-81901 Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Handle QMAKE_TARGET_XXX variablesJoerg Bornemann2020-05-122-0/+2
| | | | | Change-Id: I62151e04d21c20d8c8ad5825464f26074c8abc3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-052-8/+4
| | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-3/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * Replace most use of QVariant::type and occurrences of QVariant::TypeOlivier Goffart2020-01-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-241-2/+2
|\| | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Bump copyright yearJani Heikkinen2020-01-091-2/+2
| | | | | | | | | | | | Change-Id: I9468ef21a2cf03cf07c38f012a2aa9bae6d02a03 Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Regenerate src/*Alexandru Croitor2019-11-142-4/+4
| | | | | | | | | | | | 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 a bunch of projects after pro2cmake changesAlexandru Croitor2019-11-122-1/+2
| | | | | | | | | | | | Change-Id: I675a068411785364915a074ca0e631fec944d228 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-142-0/+2
| | | | | | | | | | | | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate tools projectsAlexandru Croitor2019-10-081-1/+8
| | | | | | | | | | | | Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Clean up tinycbor handlingSimon Hausmann2019-10-082-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | Now that pro2cmake handles the include path resolution more like qmake, the tinycbor wrapper target is not needed anymore. Re-generated some CMakeLists.txt to complete that step. Change-Id: I032b2e9bdf9e26f63f3c550d7bca5df93369a82a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CMake Build Bot
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-1/+0
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * QRegExp include cleanupSamuel Gaist2019-04-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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-161-2/+5
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783