Otherwise one gets errors like the following in standalone examples
build:
CMake Error at tools/svgtoqml/Qt6SvgToQmlMacros.cmake:65
(add_custom_command):
Error evaluating generator expression:
$
No target "Qt6::svgtoqml"
Because the examples now use the new qt_target_qml_from_svg()
function, which will try to reference a non-existent svgtoqml tool
target.
Change-Id: I16b10c4fa31bd73d0d95bbad371cde54f17c236a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Note the expected fill rule, as defined by TrueType, and explain that
if the stroked outline looks bad, it's the font's fault.
Pick-to: 6.10
Change-Id: I8c4c7d319c96d2514c3b11f27a7e85b7c408a79d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This updates weatherforecast and vectorimage examples to
use the automatic svgtoqml build steps instead of manual
conversion.
Removes .pro file for weatherforecast. This is a new
example after the move to CMake and it should have
never had a .pro file to begin with. We aren't going
to implement the svgtoqml build step with qmake, so we
can't keep this working.
Task-number: QTBUG-128915
Change-Id: I2e2506316d4fc8fb35c227309f50e0c92f2a0e38
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The svgtoqml tool has been updated, so we need to update its
generated files as well.
Pick-to: 6.10
Change-Id: Ie58653c35e99e0c1119a9bf64d803371d31261e5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding rules to the licenseRule.json files
- correcting the licensing given via REUSE.toml files
- renaming license files not located in LICENSES folder.
Their name needs to be prefixed with `LICENSE.` to be ignored
by reuse and excluded from the source SBOM. The names are
updated in the corresponding qt_attribution.json
A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why corrections are needed before turning the
source SBOM check on.
[ChangeLog][Third-Party Code] Renaming the license files with prefix
LICENSE. to have them ignored by reuse tool.
Task-number: QTBUG-131434
Pick-to: 6.9 6.8
Change-Id: I2b3e4750405f13a97b350ee65def30f1330526a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
REUSE.toml files are read by reuse to complement or override the
copyright and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse
compliant.
In order to be reuse compliant all the licenses referenced in file
or within a REUSE.toml files must be present in the LICENSES
directory at the base of the module.
The missing licenses are added.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: I5a83879a7fee1bba046b2c53d9727dc0cde05c25
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When the generators were refactored to add special-handling of the
root node, the path container logic from the structure node handling
was not included there, causing some SVGs to get a lot of Shape items
instead of combining them. This re-introduces the logic by adding
a Shape item inside the root item if we see that we can make a root
path container. (This is slightly different from structure nodes,
where the structure node itself can be the Shape item. Since the
root node has special requirements, we keep it and just add a
new Shape level inside.)
Pick-to: 6.8
Fixes: QTBUG-126716
Change-Id: If05fd38bad08749cf5c4b338ead104aa01672e49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This have been regenerated with an updated svgtoqml. One
change was needed in the example: The generator would
previously added a subitem inside the main item which was
transformed to fit the item to the requested size:
Item {
implicitWidth: foo; implicitHeight: bar
Item {
transform: ...
Shape { ... }
}
}
This was since removed, likely because it's dead weight
(and removes the possibility of overriding it), so now
the transform is set directly on the generated root
object.
But the weather forecast example had made the map labels
children of the generated item, which means the scale was
now also applied to them. This was easy to fix in the
example, by creating the extra item ourselves in the
case where it's needed.
This patch also takes the liberty of fixing some minor
whitespace issues etc.
Pick-to: 6.8
Change-Id: Ic324815c71f990bb7e8e7caed659c14267b1777a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Circles and ellipses can now be expressed simpler with a single
PathAngleArc object, instead of two PathArcs. Similarly, use
PathRectangle instead of four PathLines.
Also fixes various minor qml issues flagged by qmllint.
As a drive-by, improves the doc of the new fillTransform property with
example code that matches one of the gallery examples.
Pick-to: 6.8
Change-Id: I4529cca08c0cffc51d495f8ce815b50c053e4aa3
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This prevents policy warnings in a few cases, and we want people to
opt-in to new policies, so make our examples copy'n'paste friendly.
Pick-to: 6.8
Task-number: QTBUG-126201
Task-number: QTBUG-126468
Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
This introduces a "fillItem" property to ShapePath. Similar to
gradient, this enables filling a shape with any texture provider
item, such as an image, a ShaderEffectSource or a layer-enabled
item.
Fixes: QTBUG-104121
Change-Id: I8748a90c825e8eb4655a4ac90648c6ae74420527
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This new path element type is particularly useful for QuickShapes,
where it can be used to mimic a Rectangle item. It provides the same
API for specifying common and/or individual corner radii.
[ChangeLog][QtQuick] Add PathRectangle, a PathElement for optionally rounded rectangles
Fixes: QTBUG-123913
Change-Id: Ia0de252f70c665bd70f63aa31e3010584cc9cd8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor
A few examples had to be adapted manually, mostly those that build
additional qml modules / plugins.
The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed, these are not needed anymore because example directory
selection is handled by the qt_internal_add_example calls.
The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_qml_app_script.
A qt_generate_deploy_qml_app_script call was added for each
executable target.
Note that the deployment step will be skipped in the CI for now,
because:
- we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus
set QT_INTERNAL_SKIP_DEPLOYMENT to true
- standalone examples feature is not yet enabled in the CI, which
means we continue to build examples in-tree, and deployment is
disabled for in-tree prefix builds.
A small list of examples to deploy in the CI will be chosen in the
future, to ensure deployment coverage, without slowing down overall CI
times due to all the *deployqt invocations.
Even if deployment is disabled in the CI, the install(TARGETS) calls
for each example will still run, installing into an
'installed_examples' directory, which will not be archived by the CI.
The QtBundleQmlModuleForMacOS and bundle_shared code was removed,
because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the
deployment api, to ensure macOS bundle examples run properly in the
build dir. This works even in prefix in-tree builds, when installation
deployment is disabled.
Finally, for all examples that build additional qml module libraries or
plugins, the libraries / plugins must be installed into the bin dir of
each project, along with a qmldir file.
This is to support running the installed project for platforms that
don't have deployment api yet, like boot2qt / yocto.
If we want to have super clean install / deployment rules in the
future, we won't be able to avoid adding ugly per-platform conditions.
The current status quo is deemed an improvement over what we had
before.
Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I843d934668c25dbcd1abca52495b393579633fc5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
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: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Add licenses for third party assets and a qt_attribution.json file for
these. Also removes some assets + the mention of some assets which were
no longer used.
Pick-to: 6.7
Change-Id: Id426422b387e6d4dc63afef58c1a17b76ee92e4a
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
In order to be accessible from Qt Creator, the modules either has
to have a separate landing page and qdocconf, or we need it under
the same subdirectory as everything else. We currently want
Qt Quick Shapes to be like Qt Quick Particles and be documented
as part of Qt Quick, so the examples move back into a quickshapes/
subdirectory of examples/quick (like with examples/quick/particles/)
Pick-to: 6.7
Change-Id: Ib7aaa75da7c4c9eeca6edb5ede7952598f37df89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>