summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
Commit message (Collapse)AuthorAgeFilesLines
* Make uic generate correct C++ commentsVolker Hilsheimer2022-05-1851-102/+177
| | | | | | | | | Revert the change to uic of 05fc3aef53348fb58be6308076e000825b704e58. Task-number: QTBUG-67283 Change-Id: Icfd83bb6d80b91d4e58f1be460f6772ba49a6921 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-05-16186-5071/+457
| | | | | | | | | | | | | 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>
* uic: use C string literals for setObjectName()Marc Mutz2022-03-18108-1557/+1557
| | | | | | | | | | | | | | | | | | | | | | Because setObjectName() now takes a QAnyStringView, passing C string literals is much more efficient than using QString::fromUtf8(). This patch only deals with setObjectName() as a known property, probably from a name attribute. If the objectName property is set by a <property> element (or so I assume), we still emit a QString::fromUtf8(). Detecting objectName there would be too much magic. Besides, I haven't been able to find why sometimes there's a second setObjectName call right after the first, when in the XML it seems all kosher (name attribute and objectName <property> agreeing on the content). Change-Id: Icf07bad841ac735a9c744bbd955428ba15758089 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add VERBATIM option to add_custom_command callsAlexey Edelev2022-03-171-0/+1
| | | | | | | | | | | Use VERBATIM option to prepare the correct command line for the add_custom_command. This especially sensitive when using build directories with names containing special symbols, that cannot be handled by shell correctly. Change-Id: I51d7041cb806411135fd59bf6273c04a3c695443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Deprecate {QString, QByteArray}::count()Sona Kurazyan2022-03-121-2/+2
| | | | | | | | | | | | 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>
* typeNameForCast: use add_pointer instead of string manipulationFabian Kosmale2022-02-181-0/+13
| | | | | | | | | | | | | | Relying on string manipulation leads to -Wredundant-parens warnings in the best case, and to non-compiling code (when using typedefs) in the worst case. We can avoid both issues by simply generating code that uses add_pointer, which takes care of reference types (even typedef'd ones), and creates no warnings about parens (as we don't write any anymore). Fixes: QTBUG-100915 Pick-to: 6.3 6.2 Change-Id: Ic5b1cbfda20d920d11f51beeb62e9479261d5f00 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add missing implicit dependencies to the tool testsAlexey Edelev2022-02-094-11/+34
| | | | | | | | | | | | | moc, qmake, rcc, and uic tests execute corresponding tools inside the test executables. This adds dependencies explicitly, to execute tests using _check targets, without the need to manually build dependencies. Pick-to: 6.3 6.2 Fixes: QTBUG-98576 Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Exclude tst_qmake if the build of qmake tool is disabledAlexey Edelev2022-02-091-1/+3
| | | | | | Pick-to: 6.2 6.3 Change-Id: I5aadf5250c19d8a8b26c4a890350ff3bf79e31c7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* rcc: Fix missing IGNORE directive for Qt version in tst_rccAlexandru Croitor2022-01-311-1/+1
| | | | | | | | | | | | | The IGNORE directive was likely removed as an oversight in the linked change. This fixes the test to pass when bumping the Qt version. Amends 9836dbd6ee7860d69c85e64db3dabc3382635d61 Change-Id: I497325d6d8b8b67cce7b0840bfb9bfa70d85fe73 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-171-5/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QHash: increase minimum buckets to a full spanLars Knoll2021-12-137-97/+97
| | | | | | | | | | | | | | Change the minimum amount of buckets to be at least 128, ie. one full Span. This will simplify some assumptions in the code. Regeneration of rcc test-data needed because the extra buckets causes the order of the keys to change. Task-number: QTBUG-91739 Task-number: QTBUG-98436 Change-Id: Ic0c7da03570cc4c4e6aacc9645e536aec3667a98 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live Q_GADGET_EXPORT!Marc Mutz2021-11-271-2/+24
| | | | | | | | | | | | | | | | | | | | | | Like Q_NAMESPACE_EXPORT for Q_NAMESPACE, this variant of Q_GADGET allows passing an export macro. This is useful to avoid exporting the whole class just to get the staticMetaObject hidden therein exported. Before anyone asks: No, we don't need Q_OBJECT_EXPORT, because QObject subclasses, being polymorphic, always need to have a class-level export macro (to export their vtable), but while that technique also works for value classes (the Q_GADGET audience), it is not desirable for them, because it makes inline functions exported in Windows debug builds, which is not what we want, because it needlessly restricts what you can to with the inline functions (e.g. remove). [ChangeLog][QtCore] Added the Q_GADGET_EXPORT macro, which is like Q_GADGET, but allows passing an export macro (like Q_NAMESPACE_EXPORT for Q_NAMESPACE). Fixes: QTBUG-55458 Change-Id: I546297de1e8aa45d83381991bcd3fbca61e1eef0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move macdeployqt and windeployqt from qttools to qtbaseJoerg Bornemann2021-11-2314-0/+718
| | | | | | | | Having all *deployqt tools in qtbase will allow us to couple deployment support more tightly with the build system. Change-Id: I299efdacfa6b66a303bb3996ff3ff84e723210a5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* uic: Fix missing Python import when setting tab ordersFriedemann Kleint2021-10-201-1/+1
| | | | | | | | | Add QWidget as default import so that QWidget.setTabOrder() is found. Pick-to: 6.2 Change-Id: I7593008d1395e3fddacf7124d271a0eaf4c345d9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* CMake: remove support for building Qt with the old Intel compilerThiago Macieira2021-10-131-2/+2
| | | | | | | | | | | | | | | | | | This hasn't worked for some time. It's not in our CI and I don't think it was working at all. When I tried to build it, I ran into several problems with C++17 and an Internal Compiler Error I did not have any interest in working around. After discussing with the Intel compiler team, it was decided that fixing those issues in the old compiler is not going to happen. Instead, their recommendation is to adopt the new LLVM-based compiler, which the last commit added support for. This commit does not remove qmake support for the old ICC. It's possible someone is using qmake with a non-Qt6 project and ICC. Change-Id: Icb2516126f674e7b8bb3fffd16ad6350ddbd49e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QPlugin: add qt_plugin_query_metadata_v2() to dynamic pluginsThiago Macieira2021-10-111-11/+2
| | | | | | | | | | They return a pointer to the actual header, skipping the magic string. This is done in preparation for the header located in an ELF note, which won't have the magic. Change-Id: I3eb1bd30e0124f89a052fffd16a8229bec2ad588 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: suppress the "QTMETADATA !" magic in static pluginsThiago Macieira2021-10-111-12/+10
| | | | | | | | | | | | | | | | The .qtmetadata section is already suppressed for static plugins, but we carried this unnecessary magic string. For library file formats where we don't have a scanner (Windows COFF PE), a library that linked multiple static plugins could end up with multiple metadata found. We can't suppress the header because the version of moc could be different to the version of Qt, so we need to read the header version too. Right now, the version isn't output by moc (all the logic is in qplugin.h), but this could change again in the future. In any case, 4 extra bytes are not a big deal, so the header stays. Change-Id: I3eb1bd30e0124f89a052fffd16a82088d8303081 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Support QNX QCC compilerPasi Petäjäjärvi2021-09-161-2/+2
| | | | | | | | | | | tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::os9Newline()': qtbase/tests/auto/tools/moc/tst_moc.cpp:1225: undefined reference to `Os9Newlines::staticMetaObject' tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::winNewline()': qtbase/tests/auto/tools/moc/tst_moc.cpp:1239: undefined reference to `WinNewlines::staticMetaObject' Pick-to: 6.2 Change-Id: I629d67c1190e09b26dc09e41cb7170cb0eadf1cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Support BINDABLE for private propertiesAndrei Golubev2021-08-061-0/+11
| | | | | | | | Hopefully we won't need it but let's have it still at least for consistency Change-Id: I72289e65e5e5613174ad4d98cf8d614f9caae8e6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Handle even more include in enum casesFabian Kosmale2021-08-061-0/+5
| | | | | | | | | | | | | | The solution in d3ed7dac8aa2f4ede0c409254b9dd44842086be0 was needlessly complicated, and broke a valid use case. The issue of no identifier being available to parse after the include has been processed can instead be solved by moving the test for the closing brace after the include processing. Fixes: QTBUG-94790 Pick-to: 6.2 6.1 5.15 Change-Id: Ieec4b89e1d117637f11479e8bddc4060f93da43d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* testlib: Deprecate QWARN() in favor of qWarning()Tor Arne Vestbø2021-08-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The QtTest best practices documentations recommends using output mechanisms such as qDebug() and qWarning() for diagnostic messages, and this is also what most of our own tests do. The QWARN() macro and corresponding internal QTest::qWarn() function was added when QtTest was first implemented, but was likely meant as an internal implementation detail, like its cousin QTestLog::info(), which does not have any corresponding macro. This theory is backed by our own QtTest self-test (tst_silent) describing the output from QWARN() as "an internal testlib warning". The only difference between QWARN() and qWarning(), besides the much richer feature set of the latter, is that qWarning() will not pass on file and line number information in release mode, but QWARN() will. This is an acceptable loss of functionality, considering that the user can override this behavior by defining QT_MESSAGELOGCONTEXT. [ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning() Pick-to: 6.2 Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDirIterator: add nextFileInfo()Marc Mutz2021-07-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Before this change, next() was the only way to advance the iterator, whether the caller was ultimately interested in just the filePath() (good) or not (bad luck, had to call .fileInfo()). Add a new function, nextFileInfo(), with returns fileInfo() instead. Incidentally, the returned object has already been constructed as part of advance()ing the iterator, so the new function is faster than next() even if the result is ignored, because we're not calculating a QString result the caller may not be interested in. Use the new function around the code. Fix a couple of cases of next(); fileInfo().filePath() (just use next()'s return value) as a drive-by. [ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like next(), but returns fileInfo() instead of filePath(). Change-Id: I601220575961169b44139fc55b9eae6c3197afb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Test Q_CLASSINFO("foobar", #__VA_ARGS__) in tst_mocAndrei Golubev2021-07-081-0/+18
| | | | | | | | There's a chance that this would be used in some macro, so why not test that this thing works in general (especially since it actually works) Change-Id: Ib9d91fbd17cf16675ae89a99f010dacc5d30967a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Consistent indentation for BINDABLE propertiesAndreas Buhr2021-06-241-3/+6
| | | | | | | | | Triggered by API review in Gerrit patch 355960. Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I7cafc1cc9d4b929040b53c6bf92c91d73c3b39f2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove pure-virtual-signals.h include from tst_moc.cppEdward Welbourne2021-06-111-1/+0
| | | | | | | | | | | | | | | | | | The relevant test is conducted by tst_Moc::warnOnVirtualSignal(), added in 2009, <quote> Fix Warning saying that signal cannot be made virtual The test for virtual signal did not work. But we cannot make an error right now or it might break existing code (exemple in task 210879) </quote> but without removing the #include, so we do still get a warning about that when building tst_moc. Pick-to: 6.2 6.1 5.15 Change-Id: I5ea18058f22bbd483d1ff18b0ca7b360f6674ed9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Add relative property index to JSON output of PropertyDefAndrei Golubev2021-06-021-0/+16
| | | | | | | | Needed for QML compiler to know property index of C++ type at compile time without going through QMetaObject::indexOfProperty Change-Id: I404e71d6071d36812661df17d12b879a8dcbd146 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* uic: No longer generate star imports in PythonFriedemann Kleint2021-06-011-4/+11
| | | | | | | | | | | | | Use class WriteIncludesBase and store classes encountered in a per-module hash (Qt/custom widgets). Write out only the required classes. Add --star-import as a fallback should the change cause issues. Task-number: PYSIDE-1404 Change-Id: Ic50e26758ddd0f2f8aebbce470d32a36fb09a2c4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tst_moc: Use qtpaths instead of qmakeFabian Kosmale2021-05-051-2/+2
| | | | | | | | | We only need to the location of certain paths for the test. For that, qtpaths is sufficient. Change-Id: I5af0d56b548629edc48949150ed8fbd408b617a6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tst_moc: fix returning-reference-to-local warningMårten Nordheim2021-05-041-2/+2
| | | | | | | | | | | Although the code is never executed compilers still throw a warning because it's compiled. Amends 12b8283f899ebcf401d974927314b9531334a56e Pick-to: 5.15 6.1 Change-Id: Ib790d4bcb33c4b9f2a55a784b852275b59debde9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Moc: parse trailing return typeMårten Nordheim2021-05-044-0/+180
| | | | | | | Pick-to: 5.15 6.1 Fixes: QTBUG-71123 Change-Id: I1c3749f0892fddcc433c9afcb1d6d7c30c97c9d9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* uic/Python: Add comments for mypy to ignore star importsFriedemann Kleint2021-04-291-3/+3
| | | | | | | | | | Amends 2f975b39a967cd2ac1c234a200eb6b9c11d8b5b2. Pick-to: 6.1 5.15 Fixes: PYSIDE-1404 Change-Id: I534d78bdf44eb02bf80831a3d6c1d080a4e08698 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Silence a bunch of gcc warnings for the moc testVolker Hilsheimer2021-03-293-1/+11
| | | | | | | | We deliberately expose moc to warning-worthy C++, but we don't want the compiler warnings coming from those. Change-Id: I09c36d7c8bfbb88f7bde61fa7bcc52a5adde81da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move build tools to libexec instead of the bin dirJoerg Bornemann2021-02-235-5/+6
| | | | | | | | | | | | | | [ChangeLog][Build System] Tools that are called by the build system and are unlikely to be called by the user are now installed to the libexec directory. This is a step towards easier co-installability of different Qt versions. Pick-to: 6.1 Task-number: QTBUG-88791 Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove blacklisting for b2qt tests that now passSamuli Piippo2021-01-281-2/+0
| | | | | | | With the updated QEMU and toolchain, these tests now pass. Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Hardcode a special case of using qOverload for slots without argumentsJarek Kobus2021-01-1547-77/+181
| | | | | | | | Pick-to: 6.0 Fixes: QTBUG-90308 Change-Id: I35cd45679ded626654dd0e7e3eea8a7bb14c1d56 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-122-39/+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-078-180/+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>
* Replace QtTest headers with QTestDavid Skoland2020-12-227-7/+14
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Tests: Fix building with qmake on WindowsFriedemann Kleint2020-12-171-1/+1
| | | | | | | | Apparently some library definitions went overboard, link them directly. Pick-to: 6.0 Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-101-5/+7
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* uic/rcc: Use QT_VERSION_MAJOR for major versionFriedemann Kleint2020-12-071-2/+4
| | | | | | | | Amends 539a16a69fa1ef302cf4eb97ff5a7f8afb606d15. Task-number: QTBUG-89124 Change-Id: I68c9ab2179d464d83c3fd9eefc5609b7a5a58e27 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix uic/rcc generating outdated export for Qt for PythonFriedemann Kleint2020-12-044-8/+8
| | | | | | | | | | Bump version to 6. Fixes: QTBUG-89124 Change-Id: Ifcf60552b5b6efb86f79da34da9c34b8efae9fa4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit fc9cda5f08ac848e88f63dd4a07c08b2fbc6bf17) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qmakelib: link to QtCore's private APIGiuseppe D'Angelo2020-12-041-0/+2
| | | | | | | | Just like it was done in the .pro file. Pick-to: 6.0 Change-Id: I7def52127f4bab6f0ef490ac7eee2de2da479352 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: exclude host tools tests for android and iosAssam Boudjelthia2020-11-162-6/+11
| | | | | | | Task-number: QTBUG-87025 Task-number: QTBUG-88538 Change-Id: Id691c8463e9bf83c4538dce93300fb4fd5a99849 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* moc: output errors and warnings in a way that matches compilersVolker Hilsheimer2020-11-091-50/+50
| | | | | | | | | | | | | | | | | | gcc, clang, and MSVC all use lowercase "warning:", "error:" and "note:". Follow that standard. Also, include a column number; just print 1, as the Symbol doesn't give us a column number, and searching backwards for a newline seems overkill. This fixes IDE integrations that parse compiler output using regular expressions. The test checks for moc output, but most tests were so far only running on Linux systems. Expand this to Unix for most tests, which then includes macOS. Change-Id: I0a6151cc0dc50e52ca72ff8048a45213aebdb3a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qmakelib test: build with qmakeGiuseppe D'Angelo2020-11-061-1/+1
| | | | | | | A dependency was missing, causing qduplicatetracker_p not to be found. Change-Id: I4076d6cf82d804354731c357bcdbfd03c3d42142 Reviewed-by: David Faure <david.faure@kdab.com>
* moc: Handle include in enum, take 2Fabian Kosmale2020-11-031-1/+2
| | | | | | | | | | | | The existing logic broke down when we reentered the enumerator parsing loop, and encountered a INCLUDE_MOC_END token in the first handleInclude call. Fix this by restarting the loop in that case. Amends d8a2456fbf18f60e2d1950585d93aa530df077bf. Fixes: QTBUG-88125 Pick-to: 5.15 Change-Id: I87acaa986a81de53730eddc40bc7d48c15328aba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix tst_qmake to work for configs with cross-compiled toolsAlexandru Croitor2020-10-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | When cross-building Qt with CMake to target qemu configs in the CI, we specify the -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON option to also cross-build tools (like qmake). In this case, $prefix/bin/qmake points to the cross-compiled qmake, and the shell script that wraps the host qmake is called $prefix/bin/host-qmake instead. In such a scenario, tst_qmake ends up running the cross-compiled qmake, which thinks that it's being run on device (via user-space qemu emulation) and doesn't specify the sysroot when computing include paths, link paths, etc. This causes the test building to fail in various ways. To fix the test, check for the existence of the host-qmake wrapper, and if it exsists use it instead. Task-number: QTBUG-86053 Change-Id: Iaa4afdf11b17f23abef873dd15b1ed950126ab8c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qmake: Fix qHash-related integer conversion warningsFriedemann Kleint2020-10-171-1/+1
| | | | | | | Use size_t instead of uint. Change-Id: I1dc38f61653f9bfc4ddeddcc65b0271aa4ad1256 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>