summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Draw solid line if all elements in stroke-dasharray are zeroWladimir Leuschner2024-03-211-4/+18
| | | | | | | | | | | | Rendering a line with stroke-dasharray that only contains zeroes as elements produces a solid line in modern browsers, whereas QtSvg does not draw a line at all. An additional check whether all elements in stroke-dasharray are zero was added and in this case the line is forced to be drawn solid Fixes: QTBUG-123178 Change-Id: I5c00aaf49f887dc31cec4770010fba0c23e2e872 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* Avoid runtime warnings about negative font sizesEirik Aavitsland2024-03-181-0/+4
| | | | | | | | | | | | | | | The calculations assume that fonts have a point size, and not a pixel size set. But if an svg was rendered to a paint device (eg. a widget) that had a pixel sized font, runtime warnings would be produced, since the point size in that case is reported as -1. Fix by ensuring the painter is initially reset to a default, point sized font. Fixes: QTBUG-122752 Pick-to: 6.7 6.6 6.5 5.15 Change-Id: I5cfbb95ac3f5ac1299ae8a111bf8278836bf397b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-171-1/+1
| | | | | Change-Id: I981f3839b77e2bd296a3628ce95af6c035ff320e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-161-1/+1
| | | | | Change-Id: Ibac79d9c4cd3efaefc5ddc2b5b09e1bd27260444 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Propagate states correctly in <pattern> elementMatthias Rauter2024-03-153-13/+12
| | | | | | | | | | | | There was a missconseption about the propagation of states in the <pattern>, similar as in the <mask>, that was partially responsible for QTBUG-123010. This change applies the correction to the <pattern> element. Pick-to: 6.7 6.7.0 Change-Id: I63bef1cef287b9d94133b299c9f68665dc1ac02c Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* Enable <use> elements in <mask> and propagate state to mask childrenMatthias Rauter2024-03-156-15/+60
| | | | | | | | | | | | | | The use node could not be created within a mask due to a missing entry in a switch statement. This is corrected with this patch. The mask element was implemented such that states do not propagate to it's children. This is not correct and states are propagated correctly with this patch. Pick-to: 6.7 6.7.0 Fixes: QTBUG-123010 Change-Id: I4aab070c73b2e8a9bd0c642c70ea5b28eaef3416 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-141-1/+1
| | | | | Change-Id: Ib1ba6ae14631059a47f459da211cd196653c3d1b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-131-1/+1
| | | | | Change-Id: I84b2305340da0b18a8a157ae403d3687cbc77074 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-101-1/+1
| | | | | Change-Id: Iaf12cdb3faf83e6b550ce5d18fdd5fe537881b66 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-03-021-1/+1
| | | | | Change-Id: Ie6f54ba2411c67084e7cae04696f633e91191d58 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add missing getters for SVG nodesEskil Abrahamsen Blomfeldt2024-02-271-0/+2
| | | | | | | | | We should be able to get any property that's set on the svg nodes. This gets important when implementing the visitors for e.g. the svgtoqml tool. Change-Id: I23cfe13d975fb398064a864b0522f067584f351c Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-271-1/+1
| | | | | Change-Id: Ibee92ddfe826543fba5ab789d0701bc6c9923dd7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add enabler functions for svgtoqmlHatem ElKharashy2024-02-223-63/+71
| | | | | | | | | - Add a getter to QSvgUseNode to access the start position. - Add an overloaded function to the QSvgVisitor that operates on a QSvgNode. Change-Id: I5f4058df0b3e11a49207ce12ac1b726324aadf1d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-221-1/+1
| | | | | Change-Id: I8c1bacee3cc691a08f386c6fe58169ff05eaacb8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-211-1/+1
| | | | | Change-Id: I3bffac2765348c6afb2ef80df2b9a9b5bacc6bc2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qtsvg: remove empty examples subdirDavid Faure2024-02-204-15/+0
| | | | | | | | | | commit 985e430a9efbaec6ce5d265c7ecb moved examples to tests/manual and left an empty examples dir, confusing me greatly about where to find examples. Pick-to: 6.7 Change-Id: I23f5c03a44760278926604baf4b3a125044c139e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a crash when SVG files are loaded recursivelyMatthias Rauter2024-02-204-4/+8
| | | | | | | | | | | | | | | | | | | | This bug was triggered by a test in the resvg: structure/image/recursive-2.svg The issue is solved by not loading SVG files in the image element. This is in line with SVG 1.2 Tiny: "SVG Tiny 1.2 does not allow an SVG document to be referenced by the 'image' element", see: https://www.w3.org/TR/SVGTiny12/struct.html#ImageElement The old behavior can be reproduced by enabling trusted source mode, currently only by available by setting the environment variable QT_SVG_ASSUME_TRUSTED_SOURCE. In that case, there is no protection against recursively loaded SVG files. Pick-to: 6.7 6.6 6.5 Change-Id: I08a4842cd36d183448b1ad1c19fbfca6339a3dd6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-191-1/+1
| | | | | Change-Id: I210dcb079e47da01947ecf11fed1311e671d460c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qsvghandler: silence valgrind warningTim Blechmann2024-02-141-0/+1
| | | | | | | | | valgind detected a conditional jump depending on an uninitialized value Pick-to: 6.7 Change-Id: I803ba2e482f47ceca4695b4b4f01a68f13e8ba8f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Don't parse symbol element if Tiny12FeaturesOnly is setMatthias Rauter2024-02-121-1/+1
| | | | | | | Pick-to: 6.7 Change-Id: If41625419766ce1f0dafa9499e5b75425ca794d0 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-101-1/+1
| | | | | Change-Id: Ia5cac4ecd249febeefb72cc87ea15acc76a72ca9 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-091-1/+1
| | | | | Change-Id: I76d361c57da649a0152321b655638b0f80b6bcfe Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Allow opting out of resource limits on parsing and renderingEirik Aavitsland2024-02-062-5/+12
| | | | | | | | | | | | | | | | | | Some checks against corrupt/crafted svgs can inhibit loading unusual but legal svg files. Add a mechanism for disabling such checks for loading trusted svgs, and implement it for the maximum limit on the number of points in an svg path element. Initially only settable by environment variable, so it can be cherry-picked to earlier branches. To be followed up with a new Option flag that can be specified on the QSvgRenderer level in new Qt versions. Fixes: QTBUG-120653 Pick-to: 6.7 6.6 6.5 Change-Id: I1c1a3f31373d6f6e6ba288bb7c907ccb6f0b3611 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Skip parsing nested svg elementHatem ElKharashy2024-02-062-7/+19
| | | | | | | | | | | The SVG Tiny 1.2 does not allow nested svg elements in an SVG Document. With the current implementation, the parser will create more than one QSvgTinyDocument class, and it will stop parsing the SVG file at a wrong position, because the done flag does not cover this case. Fixes: QTBUG-121981 Change-Id: Idbba6524c6acbad20946cfe47f4f812ce6e11d23 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-02-061-1/+1
| | | | | Change-Id: Iea5d13ec49c0278df416cd0883be0691da139de2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove weather info manual testEskil Abrahamsen Blomfeldt2024-01-3124-2596/+1
| | | | | | | | | | | | | This depends on discontinued Yr API and no longer serves any purpose. (From http://www.yr.no/place/Norge/Oslo/Oslo/Oslo/varsel.xml: "After a long period of weekly downtime, the Yr API (forecast.xml/varsel.xml) is now discontinued.") Fixes: QTBUG-120695 Change-Id: I25dce0b871d586c187556c454795040765b241e8 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-311-1/+1
| | | | | Change-Id: I321e5bee3041d2db890a5f9a3040eed678715b96 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix some mistakes in the documentationMatthias Rauter2024-01-262-7/+5
| | | | | | Pick-to: 6.7 Change-Id: If322957c3dd8222b2c7f0aa9916cd9fb695c2c22 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Enable CMake autotestJoerg Bornemann2024-01-242-8/+6
| | | | | | | Task-number: QTBUG-84884 Change-Id: I2cf02ed37c4afc2ef8bb379375b6c7361e63a7ae Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Minor tweaks for new Options typeEirik Aavitsland2024-01-242-2/+4
| | | | | | | | | Lock the underlying type for bic safety, and add a no-flags value. Pick-to: 6.7 Change-Id: I9ffeeef5876d323ae91ba49bcc0b695af2c21b35 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix a bug where description and title were renderedMatthias Rauter2024-01-242-19/+15
| | | | | | | | | | | | | | | | | Parts of SvgHandler wrongfully claim that description and title are handled. However, this is not the case and the current element is not invalidated. This in turn leads to the acceptance of the text in the respective element which is added to the parent and in case of text rendered. This patch removes the claim that these elements are handled which is enough to fix the bug. Fixes: QTBUG-120233 Pick-to: 6.7 Change-Id: I60eab19c96a556647c3e96526f7d1135cbdac91e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-221-1/+1
| | | | | Change-Id: I211fbc91ea5c53eded1bae109d9f9b6204c26ab0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Replace FeatureSet with Options, a more flexible flags parameterEirik Aavitsland2024-01-2212-118/+114
| | | | | | | | | | | | | | | | | | The featureSet enum setting was added for 6.7, but discussions around API review have commented on it as somewhat inflexible, and we have also already identified expected needs for other, similar settings not covered by the featureset concept. For example, more fine-grained control on enabling/disabling of certain features, or a "trusted source" setting that disables certain safety checks. To avoid more API churn, both in the public and all the constructors of the private classes where this setting is used, this commit replaces FeatureSet with Options, a QFlags type where new bitflags can easily be added in the underlying Option enum as needed in the future. Pick-to: 6.7 Change-Id: I07b5cbde2de45f7c8dabeace2b491a11126207be Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-201-1/+1
| | | | | Change-Id: Ia634e45d1507af109de035d2fe339cbc49ad0b05 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-191-1/+1
| | | | | Change-Id: I867355f92a3a73ecbc9a645ea5979a804a6f13e0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: fix typosVolker Hilsheimer2024-01-182-5/+5
| | | | | | | Pick-to: 6.7 Change-Id: Id19fa3e7e5a4c4e21139d196f44e88c95e25e4c1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-181-1/+1
| | | | | Change-Id: I46303b924716adf24af86db1fb11ad68aed75bb1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qtsvg: add very basic QSvgWidget based example, with an animated SVGDavid Faure2024-01-177-0/+396
| | | | | | | | | | | | | The only example or manual test using QSvgWidget was delayedencoding which isn't about animations at all. This example can serve as basis for testing more QSvgWidget features in the future. It includes a tabwidget with a second QSvgWidget in order to test the showing/hiding of QSvgWidget. Change-Id: I9c26f91e7f966fbc15e6a873ae44d35cb98adb07 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add documentation for extended SVG featuresMatthias Rauter2024-01-174-8/+271
| | | | | | | Pick-to: 6.7 Fixes: QTBUG-120223 Change-Id: I72c76ba50a889b8b74de598865c151fd7b2b81e7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-151-1/+1
| | | | | Change-Id: Ie4cd87496f237117d17d1cca92ebc6d87cb331b6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fluidlauncher: don't assert on startup, fix signal/slot connectionsChristian Ehrlicher2024-01-123-16/+12
| | | | | | | | Fixes: QTBUG-120708 Pick-to: 6.7 Change-Id: I7d3a4eb99877f99cfb4cc6f3ded31d32b67f65f7 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-121-1/+1
| | | | | Change-Id: I6d13836720cf710677bc2eb6fb270cf949fc3f79 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Clean up based on header review commentsVolker Hilsheimer2024-01-1117-173/+174
| | | | | | | | | | Rename QSvg namespace to QtSvg, explicitly set the value of the FeatureSet::AllAvailable value to UINT_MAX so that all bits are set, and fix minor styling issues. Pick-to: 6.7 Change-Id: I173a8c26140b9fd1311113f679d3f4162c2cef5f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSvgWidget: replace showEvent/hideEvent with event filterDavid Faure2024-01-092-24/+29
| | | | | | | | | | This is more behavior-compatible, in case a QSvgWidget subclass was reimplementing showEvent and not calling the base class, or if the base class call was devirtualized by the compiler. Pick-to: 6.7 Change-Id: I022a5258088d15133e0910eb11b1c917b0f24c9c Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-091-1/+1
| | | | | Change-Id: I3026766b3208de9cd841e8997b3a852ccc80889f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove nodeStringList in favor of QSvgNode::typeName()Matthias Rauter2024-01-062-55/+31
| | | | | | | | | | | | | | | When adding node types (e.g. mask) the QSvgStyleSelector_nodeString was not updated. With this patch we use QSvgNode::typeName() instead. The return values were adjusted to ensure that we are backwards compatible. This list is required to make CSS work properly. The missing strings triggered a crash when testing the resvg test suit. This patch fixes the crash. Pick-to: 6.7 Change-Id: Ia715664c87d531b125627554129b8e4d930ced44 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix a crash when SVG filters failMatthias Rauter2024-01-064-15/+72
| | | | | | | | | | | | This bug was triggered by a test in the resvg test suit: filters/filters/in=BackgroundAlpha.svg The patch further includes a small optimization: The sourceAlpha filter buffer is only created on request. Pick-to: 6.7 Change-Id: I208d43c54f07d530f476b459f30c1b8aa62c2018 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2024-01-051-1/+1
| | | | | Change-Id: I855fd22c28f8f713a197cc2e98ec9cc1caca2f6c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2023-12-281-1/+1
| | | | | Change-Id: Ibe3eb1876b571bd8891d03cc6d4e4c089db9d8a6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove the use of GENERATE_PRIVATE_CPP_EXPORTSAlexey Edelev2023-12-221-1/+0
| | | | | | | Task-number: QTBUG-117983 Change-Id: Ice78d1bc3e3692ec7cab28cfed0992096837f54f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>