| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Credit to OSS-Fuzz
[ChangeLog][QtSvg] Fixed undefined behavior from using uninitialized
variable.
Pick-to: 6.5 6.2 5.15
Coverity-Id: 22618
Change-Id: Id52277bb0e2845f4d342e187dbb8093e9276b70c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: Id6b89c20f706350dbc632e1b48505cafc4cdbafb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: I591240bbee393617e15beee71a2a5e1e7ba79510
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.4 6.2 5.15
Change-Id: I8e864ab4213d65866b0004f115f4e7c7bf7173d5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although seemingly not well specified, the common behavior of web
browsers and other SVG renderers is to give priority to attribute
values specified in the CSS style attribute, in case of conflict. So
make qtsvg do the same, by moving the CSS parsing block to after the
XML attribute parsing block.
Fixes: QTBUG-100068
Pick-to: 6.4
Change-Id: I769303d69509511103d96e8d26e2cfeac1f19494
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Of the four functions returned by findStyleFactoryMethod(), two do in
fact take care to cope if the first parameter is null; but the other
two forward it to parseBaseGradient(), which did not, provoking a
warning from CodeChecker.
The single caller of parseBaseGradient() is in an if/else cascade in
which some branches do assert m_nodes.isEmpty() before passing
m_nodes.top() to their respective functions, but the
parseBaseGradient() branch did not. I infer that its returns should
check for null and duly add the missing null check, rather than
asserting against it.
Change-Id: I6c630f04522a0ae05021fe95d848be64abe6c20c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
| |
Ctors taking a string has been marked deprecated (ce83a03cfd1@qtbase).
Change-Id: I02caa6cbeb63de4190f0bcb6595f1c3ccb26d791
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
|
|
|
|
|
|
|
|
| |
Follows up on qtbase:cb27ed30f7bc58474eba991f837843eb76cbd339.
Pick-to: 6.2 6.3
Task-number: QTBUG-99642
Change-Id: I94addd4467ab51697adac1042bdb15912930b539
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A QSvghandler may be created either with an external QXmlStreamReader
object, or with a bytearray/iodevice, in which case it will create its
own stream reader. The check to end parisng at the </svg> tag was
active only in the first case. This could result in different behavior
when reading an svg image from file vs. reading it from a bytearray
or resource.
Fixes: QTBUG-99407
Pick-to: 6.3 6.2 5.15
Change-Id: I187b39256f2b16ea952a3ae1b77c067ff96e4155
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since QSvgUse nodes are the only ones that ever get stored in the
m_resolveNodes member, we can avoid extra cast and checks around it.
Also a more descriptive name wouldn't hurt.
Currently, the list is merely cleaned at the end of a parsing process,
but ideally it should not be stored at all, hence I left the comment
for possible future optimizations, if anyone's willing to do it.
Pick-to: 6.2
Change-Id: I86e83a8661679503e532c230e70f6d52092ad58e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: I26ecbed2ea48918df69fab4ec2a611a2e274919d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SVG spec mandates that path parsing should terminate on the first
error encountered, and an error be reported. To improve the handling
of corrupt files, implement such error handling, and also limit the
number of QPainterPath elements to a reasonable range.
Fixes: QTBUG-96044
Pick-to: 6.2 5.15 5.12
Change-Id: Ic5e65d6b658516d6f1317c72de365c8c7ad81891
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
|
|
|
|
|
|
|
|
| |
We know that c++11 uses nullptr to replace 0,
so we replace 0 with nullptr in the project.
Change-Id: I81eb8c13339bf235ca5eab719526680e31fa26ed
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-97422
Pick-to: 6.2
Change-Id: I4df2af0e657f241af69480e6e30d454870df51d8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-97421
Pick-to: 6.2
Change-Id: I41f3cbf8e747530a67fe5074a988ba49aeb43b8e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
|
|
| |
Doing so saves yet another approximation to pi/180 and spells out the
semantics.
Change-Id: Ied1bb9aa650a9535862622f891b716943de54cec
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The font size will be passed through a QFixed in
QFontEngineBox::ascent() and overflow there as well as in further places.
[ChangeLog] Avoid numerous overflows by limiting font size to 0xffff.
This fixes oss-fuzz issue 31701.
Pick-to: 5.15 6.1 6.2
Change-Id: I2d00c5639804af9b056f0efc979e9899c5358cf7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Color animation duration parsing mixed seconds and milliseconds.
Factor out a common function for all clock value parsing, and
add checking for overflow and illegal values as a driveby..
Fixes: QTBUG-94878
Pick-to: 6.2 6.1 5.15
Change-Id: Ie1d974cd2db55a3d65d7ce02c373021021070489
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
Negative r values are illegal, and zero means empty for circles.
Pick-to: 6.1
Change-Id: Icb1d932f35909f71dafe1ee69eb2250eeb1bb2ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parts of our rendering assumes incoming doubles can still be sane
floats.
Pick-to: 6.1 6.0 5.15 5.12
Fixes: QTBUG-91507
Change-Id: I7086a121e1b5ed47695a1251ea90e774dd8f148d
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Catch cases where the input is not containable in a qreal, and avoid
passing on inf values.
Pick-to: 6.0 5.15 5.12
Change-Id: I1ab8932d94473916815385240c29e03afb0e0c9e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
| |
Change-Id: I4b17890099f74d6571e1aee9e4523c6b7b9fb7e9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: I4d2a336b63f65ae6235b9a4b5c899e4d624492cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Specify the focal radius explicitly to avoid an uninitialized
variable in QGradient.
Change-Id: I40e44579e2364862a8bc23ef54a9e858c4ba837a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-42248
Change-Id: If3984fa22b89a65fd126d42b3a2320d5ab16c94b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Fixes: oss-fuzz-24308
Pick-to: 5.15 5.12
Change-Id: I628f073cc2ec99b18333d2831c53cd888ebc5780
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Add a maximum to how many unfinished
elements will be parsed by QSvgHandler.
Fixes: oss-fuzz-24000
Pick-to: 5.15 5.12
Change-Id: I4cea0500d2bc503d2c509d091300dd1117170299
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-84319
Change-Id: I6358030d1d7e0e023453edea10da535707320ea4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
| |
Simply using a QString is easier.
Change-Id: I4088a2230a926fc125e3444da2a3763ce1317ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I24cc0f6735ddd8fb2444bc3bb4e7b202e8bbb43f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Also fixes undefined shift of negative values.
Fixes oss-fuzz 23644
Pick-to: 5.15 5.12
Change-Id: I08c998ebf2217cb8dc50fcb805603e01e67ad64b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a maximum to how deep it will nest.
Fixes oss-fuzz 23643
Pick-to: 5.15 5.12
Change-Id: I6183c04f65a539a6c7df42bc7346a86ee58aca6c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoids a division by zero, also we don't appear to support auto sizes,
so width and height are required attributes.
Fixes oss-fuzz issue 23588.
Pick-to: 5.15 5.12
Change-Id: Ib3474c2ed4409977f6ffcf73088956c6c59ce4ad
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-84469
Change-Id: I8c3e80c77422abeb23fff747bf4ca479ff0d35b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ic4b8abc44f58b3d5d34cddf2743d0d172df4a374
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to changes in how QFont handles a family it should be given the
whole string without quotes so it can find the family name correctly.
Additionally, this changes it to use setFamilies instead of setFamily
to make this more future-proof.
Fixes: QTBUG-81926
Change-Id: I659950cf244c1f7a1a5dae6e7b0e136cfe274d47
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
Change-Id: Ieabf1eeb03b682f06344d0373de036f8f4534042
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
| |
Task-number: QTBUG-46653
Change-Id: I9944b62141d7054e3935000a819bebc5fd54df6c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
* Add const & to function parameters
* std::move an brush
* Add const & to variables assigned from functions returning const &
Change-Id: If412b78cc0198e24ce1c611fcd2026d0d723be80
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Their lifetime is controlled by the document, but the logic
was confused and lost the node.
Change-Id: Ib074dcf209d53ade894ee571a0bc08a1a7acfcab
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
| |
Change-Id: I75b3a88aae3cbd7838474d7a78f29fcd58172fc2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Make the parsing of IRI references tighter, and avoid freeing
styles when inserting a duplicate id.
Fixes: QTBUG-74104
Change-Id: I3a12fcf09ce1c55c135a4209817413ed8af75dec
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-74129
Change-Id: I871c144f1df288a310e82aef979af7cfd7a54095
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The QSvgHandler always expects the caller to handle ownership of the
generated document, also when the parsing failed.
QSvgHandler also failed to handle misplaced group elements.
Fixes: QTBUG-74083
Change-Id: I8907117d4305ecd84e328b201791001cb877fc60
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The bounds of QSvgImage are integer based (QRect) which cause rounding
issues when decimals values are used to define image (image shifted and
with incorrect size). Changing the bounds to QRectF solves the issue.
Fixes: QTBUG-73445
Change-Id: I49828e2c0b1917ec878844d520aac182581c23fb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|