Commit Graph

34 Commits

Author SHA1 Message Date
Lucie Gérard dea03be578 Change license for tests file
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: I6c16797a88702de06726a78511f71a62a5c91e13
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-04 07:32:33 +00:00
Lucie Gérard 8b36425fab Correct build system file license under example
According to QUIP-18 [1] all files under examples
should be licensed
LicenseRef-Qt-Commercial OR BSD-3-Clause

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

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ia2e8f62af64a384196a9b0c02ac5b2fbf5404a8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 08:20:16 +01:00
Mahmoud Badri fc8b38547b Add car-configurator demo
Fixes: QDS-10742
Change-Id: I3d9caf71039a9830595c97e7d944739beb81ab23
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-24 16:14:56 +02:00
Shawn Rutledge 9045d4ad8c Replace foreach with range-for in tst_qqmlparser
Amends 5fbb714cc1

Change-Id: I1d64202ab1bab5e037ceaa6f571e18b2472fee1c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-20 19:33:04 +02:00
Edward Welbourne d40a73ba50 Remove Gui requirement form qqmlparser test
It doesn't need it.

Task-number: QTBUG-79353
Change-Id: I81f50c0baf4b30bb54c9e01d4afce50084efc169
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-12 11:46:43 +02:00
Friedemann Kleint 6eaab0704d Examples test: Brush up
Introduce string literals, range-based for and streamline code.

Pick-to: 6.6 6.5
Change-Id: I7b057e9e07c59dc50c8cfe47969d1bbe83a6188c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-25 14:41:31 +02:00
Friedemann Kleint 6fef0662cb Examples test: Clean up CMakeLists.txt
Pick-to: 6.6 6.5
Change-Id: I22037de62041351d6aecbae86643f8e8f39b0361
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-22 16:01:09 +02:00
Marc Mutz 5fbb714cc1 Mark the module as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses is moderate here, but too high for this
author, unfamiliar with this code, to tackle in a short amount of
time. But they're concentrated in just a few TUs, so pick a different
strategy:

Mark the whole module with QT_NO_FOREACH, to prevent new uses from
creeping in, and whitelist the affected TUs by #undef'ing
QT_NO_FOREACH locally, at the top of each file. For TUs that are part
of a larger executable, this requires these files to be compiled
separately, so add them to NO_PCH_SOURCES (which implies
NO_UNITY_BUILD_SOURCES, too). NB: there are none such TUs in this
module.

Created QTBUG-115830 to keep track of this.

Task-number: QTBUG-115830
Change-Id: I68c9394c04af68cab46480153a5601828565461a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-08-17 18:08:04 +02:00
Alexandru Croitor 32c9e3f6f0 CMake: Make qtdoc 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 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: I7365aaefb8c6325c39219b2e359367602b3d47d7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-07-05 17:47:31 +02:00
Mahmoud Badri c77719ff5d Add FX & Material showroom demo
Fixes: QTBUG-113477
Pick-to: 6.5.2
Change-Id: I2cdd68027224516b6e6ddacad99d06b6a4dc1ba0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-06-19 15:15:11 +03:00
Kimmo Leppälä 117382f261 Remove PhotoViewer example
Fixes: QTBUG-113593
Change-Id: Idafd79a140067fac9c9f27440f4f43453e2e2ddf
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-16 20:27:36 +03:00
Kimmo Leppälä 02efcba73d Move robotarm example from quick3d to qtdoc
Pick-to: 6.5
Change-Id: Iac113bc7ed773f291ef09ebe144e1de1e0e58136
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-05-09 18:37:33 +02:00
Kai Köhne 835f15cfbb Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.

Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: I9bc7963d8524ef2ab061e32aef428711646247a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-02 12:03:42 +00:00
Amir Masoud Abdol fcd87c6e11 Fix the broken test after the retirement of qt_parse_all_arguments
As we are now processing the arguments with
cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape
characters anymore.

Task-number: QTBUG-99238
Change-Id: I04c38ec742906dfbe542714c6c91f2712a5e6fb9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-20 23:02:36 +01:00
Marc Mutz ce35a5ad39 Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  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',
with the extended set of container classes recognized.

Change-Id: Iead0ad46548d86af9677f3bab4e500e6a458f0e7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-05 14:59:19 +02:00
Konrad Kujawa 91e567ba53 Qt Quick UI for the RESTful Address Book
Add UI and client side extension for the RESTful Address Book example

Fixes: QTBUG-105199
Pick-to: 6.4
Change-Id: I01c5e2ac44838f01ccbb73d5b6e1d1e578c67618
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2022-09-07 12:58:06 +02:00
Lucie Gérard d490baa159 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Iec124e0bceb4335370674a222970cd9c1b90763f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 10:01:38 +02:00
Alexandru Croitor 9f3bce3663 CMake: Don't use PUBLIC_LIBRARIES for tests and test helpers
Change-Id: Ia61d65045cfce37185715600878c8bf53668a37a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-28 14:48:50 +02:00
Lucie Gérard 37540e46fb 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: I9499ba4c20f610ffe8af0fc3e29e6581247f2c40
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 14:45:33 +02:00
Lucie Gérard 6f57506953 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-07 18:23:52 +02:00
Assam Boudjelthia dd1ab281db Android: Skip tst_examples::sgexamples until it uses resources properly
The tests tst_examples::sgexamples is expecting the examples to be
present on local filesystem, some changes are needed to have this work
on Android.

Pick-to: 6.2 6.3
Task-number: QTBUG-88846
Task-number: QTBUG-103597
Change-Id: Ida1cb185204626908f5f13da8cfec3a55740d22b
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2022-05-20 12:05:58 +03:00
Joerg Bornemann 697d3a89b2 Remove qmake project files
Task-number: QTBUG-88742
Change-Id: Ib6ac2245f9f7788b684433b6a260331835dcdab2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-30 17:17:24 +02:00
Volker Hilsheimer d24244e4ab Add override keyword in tests to silence compiler warnings
Pick-to: 6.1
Change-Id: I1a1d0390ddbb2549d636987dd155fcb90a2687db
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-25 14:17:07 +01:00
Kai Koehne 88b1cace7e tests: Do not use versioned QML import
Pick-to: 6.0
Task-number: QTBUG-89033
Change-Id: I10b5b53c74a7535c624d36f53f96e4648d12d6bc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-12-02 16:35:12 +01:00
Alexandru Croitor dfa5303342 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: Ibd1d0f4069be8e247b607e86cf31ffa57f542bd9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-07 17:18:08 +02:00
Alexandru Croitor a48182cb96 CMake: Regenerate projects before API change
Task-number: QTBUG-86815
Change-Id: Id8da24b8a26f0263324a8fed5fd9cedbfa3ee11a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-10-01 14:36:23 +02:00
Volker Hilsheimer 745e418292 Fix compile warning: QLibraryInfo::path instead of location
Change-Id: Ic1ad96c94f74000931ad4dc80d55db71f2850bfc
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:55 +02:00
Liang Qi def3a50bf3 Update dependencies on 'dev' in qt/qtdoc
Also fix tst_qqmlparser, see qtdeclarative 1b10ce6a08
and 59410dd2f5.

Change-Id: I2cf686907fbaf5c54b92ebb49f5458bdcf257672
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-06-26 15:51:09 +02:00
Liang Qi 754f008641 examples: Rename setPersistentOpenGLContext
Align with qtdeclarative 6f4fdce07fa2e75e09dcc90a76ea6d741fb58e74.

Change-Id: I177e060c0f1a17ff807e4baeda673ebbf017c719
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-06-11 18:13:59 +02:00
Mårten Nordheim 9d555452c2 Fix naming clash for qqmlparser
Clashes with qqmlparser test in qtdeclarative

Change-Id: Iaf3dc0259e6e7d8542cb30792c8208e9e66cda77
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-09 14:19:29 +02:00
Venugopal Shivashankar de6cc8c379 CMake: Port the build setup to CMake
Fixes: QTBUG-83910
Change-Id: If0ebd9d0b528cd84ffe92955b7d1c4d580d397fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-04 23:00:45 +02:00
Simon Hausmann 2180cdd873 Remove qmlmin from tests
qmlmin was removed from declarative in commit
4527d87e8f24e99658020900d9eb114d86d4dc82.

Change-Id: I0b39189aa75162e5f5fad5e900031a6726ec0f0d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-30 22:21:28 +01:00
Liang Qi b107451957 Handle recursion depth errors when parsing JavaScript
Implementations of QQmlJS::AST::Visitor are required to do so.

Change-Id: I47d55d25d7c4dd3f826b3cd24a29fc4287d113c8
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-03-20 13:36:23 +00:00
Paul Wicking c42a5dfb51 Duplicate tests that use examples from qtdeclarative
Moving examples from qtdeclarative to qtdoc broke tests that operate
on the example sources. This patch duplicates those tests and the
documentation snippets that serve as test data to reestablish test
coverage.

Task-number: QTBUG-69383
Change-Id: I31fd1729f794081a11844be9c27ed4f9a8a5ce73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 13:12:58 +00:00