summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-107-18/+4
| | | | | | | Pick-to: 6.5 Change-Id: I8720313b2bc9cf9312a1f1a3d40171e1b2c8a257 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix the broken test after the retirement of qt_parse_all_argumentsAmir Masoud Abdol2023-01-211-1/+1
| | | | | | | | | | | As we are now processing the arguments with cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape characters anymore. Task-number: QTBUG-99238 Change-Id: Idd9647f0244bc822686a49cfb884b7a88621b028 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QSvgGenerator: add support for clip pathsGiuseppe D'Angelo2022-11-293-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVG 1.1 allows to specify clipping paths. Before they were silently discarded, but now we can support them. The SVG generator code is very simple at its core -- at *any* state change of the painter, a new <g> tag is emitted with the new state (brush, pen, transform, ...). Clipping is slightly more complicated because: 1) it needs its own element (<clipPath>), which needs to be referenced by a shape/group by using a clip-path attribute (specifying a url). 2) in QPainter clipping happens in the logical coordinates when the clip was set. Then the coordinates may get transformed again, but the drawn shapes still have to honor the original clipping. In SVG, if one specifies both the clip-path and the transform attributes on a shape, the transformation also affects the clip-path (!). This is the 'clipPathUnits' attribute [1], that however doesn't match QPainter semantics. As a workaround: a) store clip paths already transformed (using the transform existing when the clip path got set) b) when clipping is active, emit an untransformed group, clip that group, then open another inner group with the current painter transformation. This ensures that the clip path is unaffected by any further modification of the painter's transform. Add a manual test. [1] https://www.w3.org/TR/SVG11/masking.html#EstablishingANewClippingPath Change-Id: I78161091925dc09c86e35ed042e31cece2618b9d Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* CMake: Don't build iOS auto tests when QT_BUILD_MINIMAL_STATIC_TESTAlexandru Croitor2022-09-071-1/+7
| | | | | | | | | | | is set, so that integrations don't fail. In the future we might add build-only tests like we have in qtbase. Pick-to: 6.4 Task-number: QTBUG-96056 Change-Id: I444bf99a605c293c700edc8b58cae6c2b775dc05 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Fix assert with wrong number of argument to animateTransformAllan Sandfeld Jensen2022-08-311-0/+18
| | | | | | Pick-to: 6.4 6.2 5.15 Change-Id: I8e864ab4213d65866b0004f115f4e7c7bf7173d5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-239-9/+9
| | | | | | | Task-number: QTBUG-105718 Change-Id: Ica4da2b513a5c8f58b9f955e5cdabb92bbf5f48a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use QT_DISABLE_DEPRECATED_UP_TO instead of QT_DISABLE_DEPRECATED_BEFOREIvan Solovev2022-08-221-1/+1
| | | | | | Task-number: QTBUG-104944 Change-Id: I68e403d059bcdd2aabb1f28727a36d751f8c4960 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-275-5/+5
| | | | | Change-Id: I92e443076b90ab8aeddd95281003c4f56b27ca9d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-079-0/+27
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ic3d0ab6a3e3a32ce0bab59074242c0e17c6965dd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Escape the values of title and description in the svg generatorMikolaj Boc2022-06-141-0/+62
| | | | | | | | | | The values for title and description are not escaped. This leads to the generation of incorrectly structured SVG documents if meaningful characters are added in the title (<, >, ', " for example). Fixes: QTBUG-104203 Change-Id: I26bc5cf31c0178352774f9c1e6f57697a671d507 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-138-227/+16
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie5a75414af5fda27f5b5f527f3543b088b674677 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-183-41/+0
| | | | | | | Task-number: QTBUG-94446 Change-Id: I0f2a2d08a563d2525590a4f0dc2abc78be5f6110 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix tst_qicon_svg, tst_qsvgplugin, tst_qsvgrenderer runtime failuresTatiana Borisova2022-01-137-4/+21
| | | | | | | | | - add resources to binary for INTEGRITY (IGY is static build only) Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: If33215406210bb84be3b526bdae9d88ff04170f0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fuzzing: Discard logging output from QSvgRendererRobert Löhning2021-12-211-1/+6
| | | | | | | It's pointless in a fuzzer and slows down execution. Change-Id: Ic88d957224777f240426fe2f78a0a1a641b4432c Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Add BC file for 6.2.0Milla Pohjanheimo2021-12-081-0/+19463
| | | | | | | | | | Binary compatibility file added. Change-Id: I33b54245d412702c21f5fd8a03deeccd928d2a25 Pick-to: 6.2 Change-Id: I33b54245d412702c21f5fd8a03deeccd928d2a25 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix boundsOnElement() for text nodes having transformationsEirik Aavitsland2021-11-191-0/+6
| | | | | | | | | | Text layout calculations are done with a local scaling, and that was mixed up with the node transformation when computing the bounds. Fixes: QTBUG-98139 Pick-to: 6.2 Change-Id: Id3ab0500cfba4578989b5766677a53340e8cecde Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-222-2/+2
| | | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Change-Id: Id1a29c5a857b02e739dc6f796ff44b3e8856428c Pick-to: 6.2 Task-number: QTBUG-95018 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Binary compatibility file for 6.1Milla Pohjanheimo2021-09-031-0/+19053
| | | | | | | | | Binary compatibility file added. Change-Id: I30e6e5047550614aea998138be8b99a58f9adae4 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> (cherry picked from commit d8cff73bc55bcfefbc4567693f9e2372f1245a8e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fuzzing: Remove .pro-files of libfuzzer testsRobert Löhning2021-08-241-9/+0
| | | | | | | | | | They were replaced by CMake files and oss-fuzz was updated to use the latter. No need to still maintain qmake based builds. Change-Id: I39a0825dc7a5d63ca947f1406d61799cae33b3b9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix parsing of arc elements in pathsEirik Aavitsland2021-07-141-0/+14
| | | | | | | | | | | The arc element takes some flag parameters, which could be mixed up with the float parameters since svg does not require delimiting characters here. Hence legal svg would be misread.. Fixes: QTBUG-92184 Pick-to: 6.2 6.1 5.15 Change-Id: I5885c50d47e2e06ab0f02afefb7a5585c5c713ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fuzzing: Ensure importing minimal plugin into static buildsRobert Löhning2021-05-261-3/+3
| | | | | | Task-number: QTBUG-94030 Change-Id: I2f94c809645287f027e48833f971cd7cb730b425 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add binary compatibility files for QtSvg for Qt 6.0.0Milla Pohjanheimo2021-04-301-0/+19046
| | | | | | | | Binary compatibility file added. Pick-to: 6.0 6.1 Change-Id: I786583f955a611f856fcfd79d600cb5040a2032c Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fuzzing: Add CMake project files for fuzz targetsRobert Löhning2021-04-191-0/+33
| | | | | | Change-Id: I94adb3cb3231c8c049dbe11d2d218b8be5c52be8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make image handler accept UTF-16/UTF-32 encoded SVGsEirik Aavitsland2021-04-086-0/+35
| | | | | | | | | The canRead() header checks assumed 8 bit encoding. Pick-to: 6.1 6.0 5.15 Fixes: QTBUG-90744 Change-Id: Ibe934fe9ed31b89ee0fbfc4562aa66ab1b359225 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-1113-126/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I99eb79f677b4fff3f3336371d91c841de5198ffc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix compiler warning about unused functionVolker Hilsheimer2020-11-241-7/+10
| | | | | | | | | | Instead of providing an overload of diffIsSmallEnough for double and float each where one is always unused, make it a template. Pick-to: 6.0 Change-Id: I0b9ed29df844256ec77e990564201c5fe55bb59f Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QtSvg: build with explicit QChar(int) constructorDavid Faure2020-11-071-1/+1
| | | | | Change-Id: I4d2a336b63f65ae6235b9a4b5c899e4d624492cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for 'image-rendering' attributeAles Erjavec2020-11-031-0/+48
| | | | | | | | | | | Write and parse the 'image-rendering' attibute. The value is mapped to QPainter::SmoothPixmapTransform render hint. [ChangeLog] Add support for 'image-rendering' attribute Task-number: QTBUG-4145 Change-Id: I5268eac73b234cd195adade502ab9945a89f3ff6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-016-11/+11
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: Ie75a59430afde730291fb3b3e01fb4822f543e2f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects before API changeAlexandru Croitor2020-09-222-1/+40
| | | | | | | Task-number: QTBUG-86815 Change-Id: I2b5975cc1995518f1995955d9b655ab26e764ad0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Mark tst_qicon_svg test as low-DPITor Arne Vestbø2020-09-142-1/+2
| | | | | Change-Id: Ifb957ef40b5754ff3cd293c0537d5ba61ddaac3d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Work around uninitialized variable in QRadialGradientLars Knoll2020-09-121-2/+2
| | | | | | | | Specify the focal radius explicitly to avoid an uninitialized variable in QGradient. Change-Id: I40e44579e2364862a8bc23ef54a9e858c4ba837a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix check against division by zeroRobert Loehning2020-08-181-0/+8
| | | | | | | | | | The squared values must not be zero. Since both are qreal, this can happen even when neither of them is zero itself. Fixes: oss-fuzz-24738 Pick-to: 5.12 5.15 Change-Id: I61b2bc891e7e3831d4b6ee68b467db28c4f877d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test rendering length which is fuzzy nullRobert Loehning2020-08-171-0/+12
| | | | | | Pick-to: 5.15 Change-Id: I1a21f70cc5ca2319d041c5db8900e69adcb9850d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Avoid endless recursion when inflating gzipRobert Loehning2020-07-291-2/+1
| | | | | | | Fixes: oss-fuzz-24146 Pick-to: 5.12 5.15 Change-Id: I52a974e6a0694fb4afb50d932b2e99917c3034b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't divide by zeroVolker Hilsheimer2020-07-171-0/+8
| | | | | | | | Fixes: oss-fuzz-23731 Pick-to: 5.15 5.12 Change-Id: Ib21a32a30f7a204d263e6710f17567d91c6aae79 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fuzzing: Prepare for running in oss-fuzzRobert Loehning2020-06-182-3/+8
| | | | | | Pick-to: 5.15 Change-Id: I05c3b030edace7215058a295a8d72bc5ecebc266 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Use QList instead of QVectorJarek Kobus2020-06-081-1/+0
| | | | | | Task-number: QTBUG-84469 Change-Id: I8c3e80c77422abeb23fff747bf4ca479ff0d35b3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QTextCodec dependency from QtSvgLars Knoll2020-05-151-2/+0
| | | | | | | QTextStream writes in UTF-8 by default now anyway. Change-Id: Idb94484b888bfe21231fe3f34b33eaab1d33ef78 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove old BIC test dataLars Knoll2020-03-3114-264044/+0
| | | | | Change-Id: Ide4a91b7f0d1a9728051434c41bc57bf057552d8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Regenerate some of projects to be up-to-dateAlexandru Croitor2020-03-062-4/+11
| | | | | Change-Id: I7d490ab372a169de653f6be9702123ddd647c04c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate qtsvgwip/cmakeAlexandru Croitor2020-02-125-10/+5
| | | | | | Change-Id: I6f444b939e14263a5f9f4ac7fdfcd0f45ccaa453 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-02-124-11/+19910
|\ | | | | | | Change-Id: I35cfe1a52ec4a02dccc0895e3b4a40bd2ffe7295
| * Get rid of QMatrixJarek Kobus2020-02-061-2/+2
| | | | | | | | | | | | Task-number: QTBUG-81628 Change-Id: I31f5ffeff1e20f2c77a67325e58a0522d25cb1b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Add API to enable opt-in aspect ratio feature in QSvgRendererEirik Aavitsland2020-01-281-2/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][QSvgRenderer] Introduced aspect ratio mode property, so that rendering may be set to preserve the view box aspect ratio. Task-number: QTBUG-81259 Change-Id: I9802788cdaf2c30974c1ffc34ad5b67cdc74ed57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-281-0/+3
| |\ | | | | | | | | | Change-Id: I987599c388f414928aabf6a193a8250c27f4f60d
| | * Revert the keep-aspectratio feature for 5.14.1v5.14.15.14.1Eirik Aavitsland2020-01-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced as non-optional behavior for 5.14.0, but caused many regressions. This patch reverts that, and instead prepares for introducing it as an opt-in feature in Qt 5.15. [ChangeLog][QSVGRenderer] In Qt 5.14.0, rendering would keep aspect ratio implied by the viewbox, independently of the specified target area. This caused many regressions with existing code, so is reverted now in 5.14.1. The feature will instead be available as an opt-in in Qt 5.15. Task-number: QTBUG-81259 Change-Id: I3efa2db864eb80ee00e8a067e56d9912bab36442 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Don't use deprecated QMatrix class anymoreJarek Kobus2020-01-171-5/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46653 Change-Id: I9944b62141d7054e3935000a819bebc5fd54df6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-071-0/+31
| |\ \ | | |/ | | | | | | Change-Id: If6bf34ca3216ab9e0866d8c4eea7c4e92a7f3f4d
| | * Fix yet another viewbox scaling issue, for render to boundsEirik Aavitsland2020-01-031-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent introduction of keepAspectRation scaling led to wrong output (outside bounds) in the case of an explicitly specified target bounds rect, i.e. QSVGRenderer::render(QPainter *p, QRectF bounds). Fix by reverting to old code path in this case, i.e. allow the user to override the keepAspectRatio behavior by explicitly specifying target bounds. As a driveby, also fix the keepAspectRatio code path in case of a target rect having non-zero x/y coordinates. Now the fix above means that this will never happen in the code as it stands, but it may come in handy later. [ChangeLog][QSVGRenderer] From Qt 5.14.0, normal rendering will keep aspect ratio implied by the viewbox. The render() methods taking an explicit target bounds QRectF parameter can now be used to override that behavior. They will scale the output to the bounds while ignoring aspect ratio, as was the default rendering prior to 5.14.0. Fixes: QTBUG-80888 Change-Id: I399b05ca50d290b8e4b01bdc47b5b6f74c890c9a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>