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>
Also, drop all the VERSION 1.0 lines from the examples and tests. 1.0 is
actually a bad default version since it's before all the Qt versions.
[ChangeLog][QML] You can now omit the VERSION argument to
qt_add_qml_module(). This will automatically generate the highest
possible version.
Pick-to: 6.5
Task-number: QTBUG-99146
Change-Id: Ic10ec69b87c224e0e94e1785f65653815d4c778c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
The qmlqtimeexampleplugin exists as a target name both in examples and
in a test; rename the one from the test.
Change-Id: I21b68f7d6228ceaee49ba28e55516b5b10ffce3a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
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>
2nd round of test failures fixes for Android. Mostly resource bundling
related issues still.
Pick-to: 6.2 6.3
Task-number: QTBUG-97056
Change-Id: I2fac0710a7b5528fcef4480babd0cbf749e488b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
You can use them as singletons.
Pick-to: 6.2 6.3
Fixes: QTBUG-100326
Change-Id: I8e07600657bd43ba8376279ffe39cfa5d3213c38
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Dots in QML module names are useless because you cannot instantiate a
component with a dot in its name. We might as well strip all the
extensions when adding components to a qmldir file. This takes care of
.ui.qml as well.
Furthermore, JavaScript files must not be listed because they cannot be
instantiated as QML components.
Change-Id: I9782420ea79fef1d5eedef97cf7a748b96ddbe2b
Pick-to: 6.2 6.2.0
Fixes: QTBUG-96301
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
For tooling to work when a QML module is associated with an
executable rather than a library, it still needs the standard QML
directory structure in the build directory. But the source tree
is often not structured that way for the .qml files that are part
of the executable's QML module. The NO_RESOURCE_TARGET_PATH option
allows the project to essentially keep the structure from the
source tree in the resources, but use the standard QML structure
in the build directory for tooling.
Task-number: QTBUG-95598
Pick-to: 6.2
Change-Id: I53145ced0e57d7ea4795bb5260dd464f6458f444
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We get no automatic static plugin importing and linking for QML, so we
have to do it manually ourselves. This includes all of the Qt QML
modules we reference too.
This also uncovered that the tst_qmlbasicapp test requires QtQuick, but
no check was added in ccd3907b12 where
the dependency was introduced. Add that check so that the test is now
only added if QtQuick is enabled.
And because the tst_qmlbasicapp test defines static plugins,
we need CMake 3.21 or later to avoid linker command line
ordering issues. Make adding the test conditional on that too.
Pick-to: 6.2
Change-Id: I0f41352fb2fe9bd6548bf30eb8ed93366cefd263
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The CMake API needs to be adjusted to make this more convenient, but the
test shows that the basic idea works.
Pick-to: 6.2
Change-Id: I523069f33f8e3a8418224b8872b191d4229548b0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We want to be able to load modules directly from the resource file
system, no matter if we build statically or dynamically. It's limited by
the need to load plugins, of course, but as most plugins are optional an
application can easily go this way and never include any plain QML files
in an application bundle.
Pick-to: 6.2
Change-Id: I94657a43b47e442722a83e1fb306680aa50b1bc3
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
This allows us to associate different qmldir files for the same module
with one another. Typically there is one qmldir file in the resource
file system and one in the QML import path. We cannot load plugins for
the latter, but usually we have already loaded any plugins we need. Now
we can detect this.
This requires us to construct a proper URI for implicit imports. The
easiest way to do this is to just use the URI from the qmldir if
available.
Modules with versions encoded in their paths and modules with multiple
plugins cannot be resolved by URI only. These continue to be keyed by
path. However, as we do not generate such modules, we will not
automatically get two instances of those, and we won't have to fall back
from one to the other.
Pick-to: 6.2
Change-Id: Ic79add936d263a8e559fd998fca15a6ae160952e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
A class name without a plugin is pointless.
Pick-to: 6.2
Change-Id: I3cfd95bc7d9dd9e80d7f23fbd6e2c2b2b855763d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We need to treat them exactly like QML_FILES.
Pick-to: 6.2
Change-Id: I5582ad933c844c55f9015478672607e6d1218d84
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
An application with two modules which allows us to check that all the
files end up in the right places.
Pick-to: 6.2
Change-Id: I58557d453e644e13f2eb646ec3195bba2654f569
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>