Commit Graph

24 Commits

Author SHA1 Message Date
Karim Pinter 9acb78d01d Add Qt::Qml before Qt::QmlPrivate to auto tests
The build for auto tests for VxWorks fails because Qt::Qml is not added
before Qt::QmlPrivate resulting in many unresolved symbols from Qt::Qml
library. When Qt::Qml is added before it solves this problem.

Task-number: QTBUG-129113
Change-Id: I89d553ac1d6706e2e934665fed2f308e6b01ed78
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-10-22 01:27:15 +03:00
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Amanda Hamblin-Trué 8d6f9e716d tst_bindingdependencyapi: Clean up memory management
Task-number: QTBUG-115222
Change-Id: I467b54eee593f0b3b47788d83ac63cab6877d03f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-15 10:31:47 +02:00
Alexandru Croitor 5818f97e70 CMake: Make qml tests standalone projects
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 follow script:
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: Ia68c9d263e7454f0c4a26c29b10f1c535d08e2f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-07-05 12:34:11 +02:00
Amir Masoud Abdol c2d37f9646 Retire the qt_parse_all_arguments
Task-number: QTBUG-99238
Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-20 16:40:42 +01:00
Lucie Gérard 1b9808737a Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-07 17:01:30 +02:00
Alexandru Croitor a8431a4067 CMake: Don't use PUBLIC_LIBRARIES for tests and test helpers
Change-Id: I1cd769f85d5f82c43639d6787d98e536619249e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-28 14:58:42 +02:00
Lucie Gérard 5a7b716474 Add license headers to cmake files
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: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 10:41:06 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
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.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Assam Boudjelthia 841217b988 Rename android_dummy_imports.qml to dummy_imports.qml
Amends 16f0d38d56.
From 0fc8a511ba, it seems that
not only Android is relying on these imports to satify
qmlimportscanner, but also Integrity. So rename the imports
to something generic and remove the explicit mention for Android.

Pick-to: 6.2 6.3
Task-number: QTBUG-97056
Change-Id: I9273fd0f9201a805cad4d588847796f7daecb686
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-05 15:23:48 +00:00
Assam Boudjelthia 16f0d38d56 Android: unify the android tests dummy import files
This renames all qml files added before to allow qmlimportsanner to
include the necessary modules into Android packages, into
android_dummy_imports.qml, and also adds a comment in each one
describing why it's needed.

Pick-to: 6.2 6.3
Task-number: QTBUG-97056
Change-Id: I7fc0514dd9e5bc10849fdd0503547e1a75242414
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-02 15:21:09 +02:00
Fabian Kosmale de28bc00f5 QQmlBinding::dependencies: Handle QProperty
The method did not consider QProperty properties, as those do not show
up via the active guards mechanism.
At some point, we probably also want to introduce
QQmlAnyBinding::dependencies, as there are now bindings which do not
derive from QQmlBinding.

Pick-to: 6.2
Change-Id: Ib4b227a440e9494c09d92028f9eaa5ad1e87342f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-10-01 14:04:02 +02:00
Mitch Curtis e310dadef7 Consolidate test helpers into private libraries
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.

We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.

We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.

Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-13 21:17:04 +02:00
Fabian Kosmale 78ab4b8d8b Remove the qmake project files
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.

Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-15 15:34:22 +01:00
Alexandru Croitor 08adbefa13 CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.

Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-06 13:19:37 +02:00
Tor Arne Vestbø a5df29201f CMake: Update Apple platform defines after rename in qtbase
Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 10:42:00 +01:00
Alexandru Croitor 1d4fa26a70 Regenerate qtdeclarative
Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-02-12 17:30:34 +00:00
Alexandru Croitor ba494aaa24 Regenerate all projects with new CMake API version
Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 12:24:51 +00:00
Alexandru Croitor 387f360b3b Regenerate tests
Change-Id: I67a6c8f1659e7b471a4fcb92a2699292cf4eea81
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 10:22:34 +00:00
Alexandru Croitor 6a0bb9a7d6 Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
2019-10-11 16:21:42 +02:00
Jan Arve Sæther e2b0e8dc79 Fix deployment of QtQuick for Android with dummy_imports.qml
We rely on the qmlimportscanner to find out what to deploy, but it is
limited to scanning .qml files. These tests creates the QML code from C++,
so qmlimportscanner fails to detect those dependencies.

Therefore, we add a dummy_imports.qml file that has the sole purpose of
giving qmlimportscanner which additional dependencies the test has.

Change-Id: I4237b738e408c309b9b21de7e53d1a4e4acb7e2e
Task-number: QTBUG-73512
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-08-21 14:58:35 +02:00
Leander Beernaert 4e14f6e70a Add QtDeclarative Test Coverage
All tests compile and run on a developer build.

These tests are failing:
tst_qqmlsqldatabase Fails due to missing sql driver
tst_qqmlsqldatabase Fails in wip/qt6
tst_ququicklayouts Fails in wip/qt6
tst_flickableinterop Fails in wip/qt6
tst_qquickpinchandler Fails in wip/qt6
tst_qquickflickable Fails in wip/qt6
tst_qquickgridview Fails in wip/qt6
tst_qquickimage Fails due to missing jpeg plugin
tst_qquicklistview Fails in wip/qt6
tst_qquicktext Fails in wip/qt6
tst_qquickcanvasitem Fails in wip/qt6
tst_scenegraph Fails due to missing jpeg plugin
tst_TestFiltering Fails in wip/qt6

Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-14 14:01:58 +00:00
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Anton Kreuzkamp 17513266b8 Add API to learn about QQmlBinding's dependencies
Adds a method `dependencies()` to QQmlBinding, that returns a
QVector<QQmlProperty> of all properties the binding depends on. The API is
meant to be used in debugging tools (e.g. in GammaRay).
Also adds a public method subBindings() to QQmlValueTypeProxyBinding in
order to be able to access their dependencies.

Change-Id: Ib833703ec9e632661626c4532b8d73997f38e62b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-13 04:07:30 +00:00