| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
...as well as to the cmake command to run svgtoqml at build time.
Pick-to: 6.11
Change-Id: Ib9c2115f7ac34285cc5c9d67c64e2d2ebbcd738a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a packaged build, svgtoqml is placed next to a qt.conf file.
This caused it to fail to launch from anywhere except in its local
directory, with an error that it could not find the QPA plugin.
It turns out that this was triggered by trying to query the
available QPA plugins before creating a QGuiApplication. We did
this to avoid forcing the minimal plugin if it is not available,
but other tools that hardcode this plugin does it unconditionally,
so we do the same in svgtoqml.
Pick-to: 6.11
Task-number: QTBUG-142792
Change-Id: I2b7c0aa20c251a8fbf4f2372b8bc5e0802e298b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 641883c7e19b618ee47f0f7988bb161dc1056ae2. This change
fixed an issue when cross-compiling and a platform plugin
is not available. It selects the offscreen plugin when this
case is detected, but uses the default platform plugin
otherwise, since the offscreen plugin has limited support for
fonts so we do not want it as the default.
However, this did not fix the case where the platform plugin
exists but there is no windowing system, e.g. when building
over SSH.
Luckily, the minimal QPA plugin does have proper font
support and also works over SSH. We can therefore use this
as the default as long as it exists. The only exception is
if we need GUI to preview the result (if -v is specified or
if there is no output file.)
Task-number: QTBUG-140675
Change-Id: I967c8649be070c7ffc6541d033603c8e0e5c6eae
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of the comment generated by svgtoqml, we would include the
entire file path as it was provided in the arguments. With the
introduction of the automatic svgtoqml build step, this argument
will now include the full absolute path.
Since the QML file is embedded in the binary, this caused internal
file paths from our build farm to leak into the binaries, triggering
an alert in the QA system.
Change-Id: Iecffb5cfcf1cee127186b2c5d2e21e2ccc47f48a
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Qt SVG parser depends on having a QGuiApplication in order
to load e.g. fonts. We want to prefer the default plugin on
desktop platforms, since you will then be able to use SVGs that
depend on system fonts as well.
However, in a host build, where there are no GUI-enabled QPA
plugins, we fall back to offscreen, which has some font
support but which does not depend on a window manager.
Task-number: QTBUG-139976
Change-Id: Ia9a5239c3d16f1daa4ad68d66412f519109361c2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It fails in a no-prefix per-repo build of qtdeclarative standalone
examples build, with the following error:
ninja: error:
'examples/quick/quickshapes/weatherforecast/Qt6::svgtoqml', needed by
'examples/quick/quickshapes/weatherforecast/.qt/svgtoqml/Europe_generated.qml',
missing and no known rule to make it
Wrap the command in a <TARGET_FILE> genex, and prepend the tool
wrapper shell script for Windows hosts.
Amends 018b10ff710e75841b02e052f8d851723f555b7b
Change-Id: Ib4aa91f3680cad40ac462a48b09a4acf795ff7ae
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a build command for generating QML files out of SVG
files automatically. It works by first calling svgtoqml on the
sources and then adding these to the QML module for the target.
[ChangeLog][svgtoqml] Added a cmake api for automatically
generating QML files from SVG files in an application.
Task-number: QTBUG-128915
Change-Id: I44e70f0ada4ca8ac9ac8253d46832d3a286da927
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Certain checks and restrictions are in effect by default on
the SVG parser. This introduces a way for disabling these
in the VectorImage, when it is used with trusted content.
Change-Id: I7a11c7276a01ae9eb128ed0afb2a04c38fe90c7a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were spending time doing the same implementation twice,
since the item generator and QML generator were two separate
code paths. We also risked having bugs which only occurred in
one of the code paths.
This may at some point be a valid optimization, but during
development it is premature. The parsing of the QML is a
one-time cost when loading the SVG and this is an acceptable
cost for now. Optimizations can come later when we have
a more stable state.
Fixes: QTBUG-135269
Change-Id: I649a89d7a2e18ef1c0213658dc106f2cc1194841
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works by first creating a transform object per animated
property we have in SVG. Then it creates a set of key frames
based on these. All key frames will touch all animations, so
that they can also control activating and deactivating an
animation, freezing the end result of one, etc. The frames
we generate are based on the end points of animations as well
as right after (and sometimes right before) the animation to
record the state when it is inactive.
If any of the animations have infinite repeats, we create a
set of key frames for the finite part first and then the
infinite loop, so that these are separated into two different
animations in QML.
At each key frame we check all animations to see if they
affect their corresponding transform at this time. If they
are inactive, the transform will be set to a default value.
But if they are active (either running or frozen), we
query the interpolated value from the animator to get the
value at the specific time.
Pick-to: 6.9
Fixes: QTBUG-127590
Change-Id: I0102cefb3713a0c36661fb3da008b25b19a80427
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
To allow other usages of QQuickGenerator and related classes, remove
(most of) the hardcoding against qtsvg and restructure the api a bit.
As a driveby, also ensure that all members in the generator's NodeInfo
structs are initialized by default.
Change-Id: I731a99422ff03ec7bd0301b124e3b3264c6cc0b7
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
- Remove tech preview note in help
- Add single-letter shorthands for some more common options
- Rearrange order options for increased clarity in help
Pick-to: 6.8
Change-Id: Ibada4e59357f0c15772375336a8445fb664f7ee3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1) Implement & document that if an output file is not given, the tool
behaves as if the --view option was given.
2) If reading or parsing the input file fails, then avoid creating an
empty output file. Also, let the tool exit with an error code.
Pick-to: 6.8
Change-Id: Iaeb8cbb61c2c485cfa3ecba0d3193ba7cd4e5b87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
| |
This adds proper documentation for svgtoqml and essentially takes
it out of tech preview.
Fixes: QTBUG-122695
Change-Id: I2b72e9189a9aabb65d9dc7162ac5a643695ad7a8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a few options to the svgtoqml generator, to enable
more control over how embedded images are stored.
It adds the "keep-asset-paths" option. When this is set,
the generator will check if an image reference was originally
to a file on disk. Instead of duplicating this, the output
will contain a relative reference to the original file instead.
It adds the "asset-output-prefix" which overrides the default
prefix of output files.
And it adds the "asset-output-directory" which overrides the
default target directory. The default target directory has
also been changed to match the directory of the output QML
instead of always saving to the currently active directory.
In addition, this change makes the tool always output PNG
files, since JPEG is a lossy format and should never be preferred.
Previously, PNG was only preferred when the image had an alpha
channel.
Change-Id: I9a9b03eaea3ac511419789cfc5651d398ce42a5b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
According to QUIP-18 [1], all tools file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I109277d926cb95d45306fd0fe176451baee201cc
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
| |
|
|
|
|
|
|
| |
Refactoring QQuickVectorGraphics module to QQuickVectorImage which is
better at explaining what this module does.
Change-Id: Icdb6498e23355e6db3addb926847f8319c9d56e0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the generation part of the tool to a separate private module,
which can generate either a QML file or a QQuickItem representation
of an SVG File. The generator relies mainly on QtQuickShapes for
rendering, in addition to using other QQuickItems.
The generator in this module can be used by 'svgtoqml' tool. The plan
succeeding this commit will be to add a QML module that will expose a
QML component for loading an SVG file at runtime.
Task-number: QTBUG-121659
Change-Id: I4014eb696a7d39f05f8b3035bdcee50d2acaf2b6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add --optimize-paths option to do expensive path manipulation
at build time instead of at runtime. This may cause the generation
of separate fill and stroke versions of the same source path.
Task-number: QTBUG-116883
Task-number: QTBUG-121203
Pick-to: 6.7
Change-Id: Iacda16d8dbddf5b8219c290fac473d78c073576e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
This tool is in tech preview. Only a subset of SVG Tiny works
at the moment. The tool does not even support everything that
QtSvg supports.
Task-number: QTBUG-116883
Change-Id: Ie33f8bf42a5d37b63b86f6816df21960a1ef1071
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|