summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix compile time type normalization codeLars Knoll2020-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | Use a simpler constexpr to generate type name on gcc This works around an ICE on gcc in release mode when compiling with PCH enabled. As the type we're getting from Q_FUNC_INFO is already in a somewhat normalized form, this requires significanlty less processing and esp. not a recursive constexpr method which I suspect triggers the ICE. Fix integer type conversions to also properly normalize long long values (to q(u)longlong. Make sure the mapping also works on MSVC, where long long types get mapped to __int64. Also, normalize unsigned short and unsigned char to ushort and uchar, respectively, to follow the convention set by uint and ulong. Add some test cases to verify the mappings. Change-Id: I3dec5764450bf22ab6f066597803c3f46c2cd5ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-074-29/+29
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QMetaType instead of integer based type idsLars Knoll2020-09-231-0/+1
| | | | | | | | | 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-238-22/+22
| | | | | | | | | | | 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>
* Extend QSequentialIterable and add QAssociativeIterableUlf Hermann2020-09-191-0/+2
| | | | | | | | | And add mutable iterators. This requires some refactoring of the existing iterators. Task-number: QTBUG-81716 Change-Id: I61b3a3e8c0df5fd449679257a29d9f0c3d19c4f0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix deprecation warnings in testsVolker Hilsheimer2020-09-171-3/+3
| | | | | | | | Adjust to changes to QIcon::pixmap, QMetaType::type, and QAbstractItemView::itemDelegate. Change-Id: I9eb0331ef899131afc86c33f27feeee76331ffc8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-126-7/+7
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-112-6/+6
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qdbuscpp2xml: stop doing math on enumerationsGiuseppe D'Angelo2020-09-051-1/+1
| | | | | | | Cast it to int to do math. Change-Id: Ia553cccb7e160df50e77fba63d66d0ed45c246c2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Ignore weight in .ui files instead of converting itEskil Abrahamsen Blomfeldt2020-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | In 3558704ed5c3d2c6dc6d024dfa454997469ca75f, we added code to support old .ui files which used the old integer scale for font weights by checking for a special attribute which would help separate new and old files. Since then, it has become apparent that the weight element in .ui is not actually used for anything, since it is only emitted when the bold flag is set and always has to match QFont::Bold in these cases. So instead of converting, we simply ignore it now, and respect the bold flag instead. This also reverts the changes to ui4.* in uic, since the scale attribute is no longer needed. Task-number: QTBUG-42248 Change-Id: I1898868b58004099590f4eaf01f24c57bd34d779 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make bindings introspectable through mocLars Knoll2020-09-022-141/+101
| | | | | | | | | | | | | | | Add a new BINDABLE declaration to the Q_PROPERTY() macro that tells moc where to find the QBindable for the property. Add a QUntypedBindable base class to QBindable<T> that gives access to generic functionality and checks argument compatibility at runtime. QBindable<T> will still do static checking at compile time. Add QMetaProperty::isBindable() and QMetaProperty::bindable() to be able to dynamically access the binding functionality. Change-Id: Ic7b08ae2cde83fd43e627d813a886e1de01fa3dc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QNotifiedProperty and Q_PRIVATE_QPROPERTYLars Knoll2020-09-021-100/+96
| | | | | | | | | | | | | And all related functionality. This is being replaced by Q_BINDABLE_PROPERTY and Q_OBJECT_BINDABLE_PROPERTY in the next few commits. The new infrastructure coming will play nicer along with the existing property system. Commented out some autotests, that will get reimplemented with the updated infrastructure. Change-Id: I50c30bd4d5c6c6b6471f8eb93870e27d86f5a009 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use OpenType font weightsJonas Karlsson2020-08-281-1/+1
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix warnings in tst_mocTor Arne Vestbø2020-08-235-5/+34
| | | | | Change-Id: I4cbc851e59febdc533c02fb4b95d2924348086b4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QStringRef and remains to Qt5CompatKarsten Heimrich2020-08-202-3/+4
| | | | | | | | | Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* cmake support for tst_mocFabian Kosmale2020-08-103-6/+155
| | | | | | | | | | | | | We use qt_wrap_cpp instead of AUTOMOC so that we can easily find the json files. Getting autorcc to run only after json file has been generated was deemed too tricky. Therefore the test is slightly modified to check for the json files in its directory instead of the resource, if the qrc file does not exist. Change-Id: Id1aabb117c8bab3ff81156da1f66d64e796bf18b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* moc: allow wrapper generation for QProperty in pimpl classFabian Kosmale2020-07-141-0/+7
| | | | | | | | | | | Previously, only QNotifiedProperty was supported. As moc cannot determine by itself whether the backing property is a QProperty or a QNotifiedProperty, allow NOTIFY false to indicate that it is a plain QProperty. For symmetry, NOTIFY true is also allowed and means that the backing property is a QNotifiedProperty. Change-Id: I66f3105c976ef084198ce8658bc07499a3cb1cd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* moc: For non-STORED QProperties, expect a pointerUlf Hermann2020-07-091-8/+8
| | | | | | | | | | | This way we can return a nullptr for cases where the class does not want to provide a property at all. For example outside of bindings when reading the default value. The moc-generated code can check for such nullptrs and handle them. Change-Id: I7ff478cb254012147bb7aed3feb160e3e679cb6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate subdir test projectsAlexandru Croitor2020-07-092-1/+14
| | | | | | | | And generate a few more test projects that were missing. Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-095-7/+7
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* moc: Allow out-of-line storage for Q_PRIVATE_QPROPERTYUlf Hermann2020-07-081-0/+38
| | | | | | | | | | If you pass "STORED false" the name is interpreted as function to be invoked in order to access the property. This allows storage of a property in a lazily allocated data type. Change-Id: I4d3a9cac6985c6419ce687868cb74b91921595a6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't set the environment variable QT_RCC_TEST anymore in tst_rccJoerg Bornemann2020-07-081-3/+0
| | | | | | | | The reason for setting this variable was removed in commit 300bd7fff8b. Task-number: QTBUG-25078 Change-Id: Id06072c099481a258cb65b4603efe010e306b7b2 Reviewed-by: hjk <hjk@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in other qtbase testsJarek Kobus2020-07-071-2/+2
| | | | | | Task-number: QTBUG-84469 Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Get rid of shared null for QByteArray, QString and QVectorLars Knoll2020-07-061-1/+1
| | | | | | | | | | | | | | As a side effect, data() can now return a nullptr. This has the potential to cause crashes in existig code. To work around this, return an empty string from QString::data() and QByteArray::data() for now. For Qt 6 (and once all our internal issues are fixed), data() will by default return a nullptr for a null QString, but we'll offer a #define to enable backwards compatible behavior. Change-Id: I4f66d97ff1dce3eb99a239f1eab9106fa9b1741a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unnecessary ; after function implementationsLars Schmertmann2020-07-062-4/+4
| | | | | | Task-number: QTBUG-82978 Change-Id: Iea3bcaec1ef9f4bd0f73e5dccca33354650f5bf4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Avoid use of Q_UNUSED by eliminating the parameter namesLars Schmertmann2020-07-031-8/+6
| | | | | | | | | This change only happens to files touched by the commit to add missing ; to Q_UNUSED. Task-number: QTBUG-82978 Change-Id: I10e6993a2bb3952cf9a262708b8573550e0dbe63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Skip / ignore failing tests on CMake platformsAlexandru Croitor2020-07-012-0/+4
| | | | | | | | | | | | | Skip crashing tests and ignore failing tests on CMake platforms. Add missing QTEST_ENVIRONMENT=ci env var assignment to Coin test instructions. This was hardcoded by the Coin code for qmake configurations. Task-number: QTBUG-85364 Change-Id: Id2312e504a0d36b8f8596d4cebaa49c63731406e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix tst_qmake not to hang and re-enable itAlexandru Croitor2020-06-261-5/+1
| | | | | | | | | | | | | We don't really know why, but using the ctest --force-new-ctest-process flag stops the test from hanging. Also re-enable the test. Task-number: QTBUG-78449 Task-number: QTBUG-81365 Change-Id: I33094696dfe3f610dc257089074b1c2a9926f651 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Remove superfluous define from tst_qmakeJoerg Bornemann2020-06-263-23/+0
| | | | | | | The QMAKE_CROSS_COMPILED define isn't used since 2011. Change-Id: I9f03791e9f7c0ef439db5e65d930c0b7cb928974 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix tst_qmake::resources() on WindowsJoerg Bornemann2020-06-264-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | This test calls qmake on a project that generates a .qrc file. On Windows, where debug_and_release is on by default, the generated qrc file ends up in a "debug" or "release" subdirectory. On other platforms the file is generated directly in the build dir. To guess the right location, the preprocessor defines RELEASE_BUILD and DEBUG_BUILD were passed to tst_qmake.cpp by the test's .pro file. While the mapping from debug_and_release was fine for the .pro file, it was commented out in the automatically converted CMakeLists.txt. Instead of trying to fix the condition, we're going the easier route that's used in all other .pro files of tst_qmake: make sure that debug_and_release doesn't get in the way. In other tests this is done by setting DESTDIR = ./ which doesn't work for the generated qrc file. That's why we simply do CONFIG -= debug_and_release to make sure that everything is generated directly in the build dir. Change-Id: I557ac4e21d7b385004d369fae8a3f727d76d4d88 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove QByteArray's methods taking QString and their usesSona Kurazyan2020-06-251-1/+1
| | | | | | | | | | [ChangeLog][QtCore][QByteArray] Remove method overloads taking QString as argument, all of which were equivalent to passing the toUtf8() of the string instead. Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in uic testsJarek Kobus2020-06-231-2/+2
| | | | | | Task-number: QTBUG-84469 Change-Id: I2d3a8e7eb7094844544e841145fa5d2de8c66adb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in moc testsJarek Kobus2020-06-221-90/+58
| | | | | | Task-number: QTBUG-84469 Change-Id: I6a775b32a82658485216a4827a43503b395161c6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move implementation of QVector/List back to qlist.hLars Knoll2020-06-202-25/+9
| | | | | | | | | | | | | And name the main class QList. That's also the one we document. This gives less porting pain for our users, and a lot less churn in our API, as we use QList in Qt 5 in 95% of our API. In addition, it gives more consistent naming with QStringList and QByteArrayList and disambiguates QList vs QVector(2|3|4)D. Fixes: QTBUG-84468 Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>