diff options
| author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2025-04-01 09:03:15 +0200 |
|---|---|---|
| committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2025-04-11 15:50:23 +0200 |
| commit | b3cbee9f983da60c96f9808971551c7f565a29f3 (patch) | |
| tree | 872a74fc9331f9ef8e245e2dff22097a2ee8f41f /tools | |
| parent | a55a85ecca0220b2bf9df717ee2696dffbef331f (diff) | |
Implement item generator via QML generator
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>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/svgtoqml/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/svgtoqml/main.cpp b/tools/svgtoqml/main.cpp index 598806cc7f..c5e2352adc 100644 --- a/tools/svgtoqml/main.cpp +++ b/tools/svgtoqml/main.cpp @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) QCoreApplication::exit(-1); if (obj) { auto *containerItem = obj->findChild<QQuickItem*>(QStringLiteral("svg_item")); - QQuickItemGenerator generator(inFileName, flags, containerItem); + QQuickItemGenerator generator(inFileName, flags, containerItem, engine.rootContext()); generator.generate(); } }); |
