summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* QMetaType: use modern comparisonsTatiana Borisova2024-05-101-0/+1
| | | | | | | | | | | | | Internal QPropertyBindingPrivatePtr, QArgumentType classes also have been updated; Replace class operators operator==(), operator!=() of QRegularExpression to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: I010617cbcb8bd6afb7c21ee4345398648821f72c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* CMake: Make corelib tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I28b6d3815c5f43d2c33ea65764f6f3f8f129eaf3 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-2/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tst_qmetatype: port away from deprecated callsIvan Solovev2022-08-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The most common changes are: * Replace QMetaType::type("name") with QMetaType::fromName("name").id() or QMetaType::fromType<Type>().id() * QMetaType::typeName(int) -> QMetaType(int).name() * QMetaType::typeFlags(int) -> QMetaType(int).flags() * QMetaType::metaObjectForType(int) -> QMetaType(int).metaObject() * The static QMetaType::{load,save} methods are replaced with non-static versions * The static QMetaType::{create,destroy,construct, destruct} methods are guarded by QT_DEPRECATED_SINCE calls. The tests are also extended with non-static calls where they were missing. Fixed potential memory-leaks in these tests. Add separate unit-tests for deprecated APIs and guard them with QT_DEPRECATED_SINCE As a drive-by: use nullptr instead of 0 in some places Task-number: QTBUG-104858 Change-Id: I4b0cdd29bc197c186b835002372240aae3098c33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TOIvan Solovev2022-08-191-1/+1
| | | | | | | | | | | | | | The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Task-number: QTBUG-104944 Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMetaType: add a test to confirm that types are equal across librariesThiago Macieira2022-08-121-4/+31
| | | | | | | | Because of the template shenanigans. This is just to make sure. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f989e7d555894f Reviewed-by: Ulf Hermann <ulf.hermann@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 tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Cleanup tests that add test data to resources explicitlyAlexey Edelev2022-02-111-17/+0
| | | | | | | | | | | | Remove Integrity and Android specific code that explicitly adds test data to the resource files. qt_internal_add_test functions implicitly adds test data to resources for Android and Integrity platforms by default. Change-Id: Ia1d58755b47442e1953462e38606f70fec262368 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix autotest runtime failures on INTEGRITYTatiana Borisova2021-12-161-0/+14
| | | | | | | | | | | - add test resources to binaries - link Qt::Gui to tst_qpointer for static build case Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: I311827b9c641eaf9537091b051c15f9fcbcb9f0c Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qmetatype: remove the previous clang-arm workaroundMarc Mutz2021-12-151-5/+0
| | | | | | | | | Let's see whether splitting the TUs has made the test amenable to be compiled on Clang for ARM again. Pick-to: 6.3 Change-Id: I6bf1e31189f5058dc393adefabaf3014dce4bcf2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qmetatype: factor the most expensive test into its own TUMarc Mutz2021-12-071-0/+1
| | | | | | | | | | | | | | | | The PRINT_2ARD_TEMPLATE macro expansion alone is responsible for about 50% of the compile time and RAM requirements of tst_qmetatype.cpp. By factoring it into its own TU, we reduce the maximum memory load on my machine from 4.0GiB to 2.5GiB, provided we don't parallelize the build, then we take 0.5GiB more. This is a quick-fix for the QNX build problems currently plaguing the CI. Going forward, we should probably have a better solution, whatever that may be. Task-number: QTQAINFRA-4669 Change-Id: I2732b4c25b369b15cce1c7afe222d041ecb6795a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Split up the QMetaType unit testVolker Hilsheimer2021-02-091-1/+1
| | | | | | | | | | | gcc 9 consumed enourmous amounts of memory building the test, regularly dying on a VM with 4GB RAM. Splitting it up helps. As a drive-by, use inline static variables, and rename the header used by other tests to tst_qmetatype_common.h. Change-Id: Ib716d8e3506aac6c87845e57b04cb1a4f6c68387 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-3/+3
| | | | | | | | | | | 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>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-241-0/+1
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Properly handle CONFIG += thread aka Threads::ThreadsAlexandru Croitor2020-08-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mkspecs/features/qt.prf adds a dependency on the system threading library if the Qt Core thread feature is enabled. Because qt.prf is loaded by any public or internal Qt project, it's essentially a public dependency for any Qt consumer. To mimic that in CMake, we check if the thread feature is enabled, and and set the Threads::Threads library as a dependency of Qt6::Platform, which is a public target used by all Qt modules and plugins and Qt consumers. We also need to create a Qt6Dependencies.cmake file so we find_package(Threads) every time find_package(Qt6) is called. For the .prl files to be usable, we have to filter out some CMake implementation specific directory separator tokens 'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call target_link_libraries() with a target created in a different scope (I think). As a result of this change, we shouldn't have to hardcode Threads::Threads in other projects, because it's now a global public dependency. Task-number: QTBUG-85801 Task-number: QTBUG-85877 Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-091-3/+3
| | | | | | | | 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>
* Remove winrtOliver Wolff2020-06-061-6/+2
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Enable qmetatype test with CMakeFabian Kosmale2020-04-011-0/+1
| | | | | | Change-Id: I34dcc0ae9187092ae1e277c2b3676d551a76991a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Regenerate tests projectsAlexandru Croitor2020-03-121-1/+0
| | | | | | Change-Id: I559bf2c82d83fac9bd3c52a331d99e1e83bc3f87 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-1/+1
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate tests/auto/corelib/kernelAlexandru Croitor2019-11-121-4/+5
| | | | | | | Change-Id: I466387408d26854e11fde0a1fbef74c2fad764c7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Implement SUBDIR-= conversion in pro2cmake toolJędrzej Nowacki2019-08-011-0/+41
CMake doesn't support removing subdirectories therefore one need to convert all removal to conditional adds. The resulting code doesn't win a beauty contest. That is because handle_subdir works on already processed strings which means it doesn't have access to the boolean operations. As such it can not minimize the expressions, but it works and in the most simple cases it is pretty good. The patch re-generates CMakeLists.txt under tests/auto/corelib/kernel excluding qcoreapplication, qmetatype, qmimedata, qobject, qtimer, which are suffering from unrelated problems, like for example Gui, pthread linkage issues. Change-Id: I18a02f6eda7a3b41b1313211c8bc9ce277bb67be Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>