Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-svg for openSUSE:Factory checked in at 2021-09-07 21:21:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-svg (Old) and /work/SRC/openSUSE:Factory/.qt6-svg.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-svg" Tue Sep 7 21:21:16 2021 rev:8 rq:917035 version:6.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-svg/qt6-svg.changes 2021-07-05 22:23:54.701289360 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-svg.new.1899/qt6-svg.changes 2021-09-07 21:21:32.773312015 +0200 @@ -1,0 +2,6 @@ +Wed Sep 1 13:03:51 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 6.1.3: + * https://www.qt.io/blog/qt-6.1.3-released + +------------------------------------------------------------------- Old: ---- qtsvg-everywhere-src-6.1.2.tar.xz New: ---- qtsvg-everywhere-src-6.1.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-svg.spec ++++++ --- /var/tmp/diff_new_pack.krzbeu/_old 2021-09-07 21:21:33.409312784 +0200 +++ /var/tmp/diff_new_pack.krzbeu/_new 2021-09-07 21:21:33.413312788 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.1.2 +%define real_version 6.1.3 %define short_version 6.1 %define tar_name qtsvg-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-svg%{?pkg_suffix} -Version: 6.1.2 +Version: 6.1.3 Release: 0 Summary: Classes for rendering and displaying SVG drawings License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) ++++++ qtsvg-everywhere-src-6.1.2.tar.xz -> qtsvg-everywhere-src-6.1.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/.cmake.conf new/qtsvg-everywhere-src-6.1.3/.cmake.conf --- old/qtsvg-everywhere-src-6.1.2/.cmake.conf 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/.cmake.conf 2021-08-26 09:29:50.000000000 +0200 @@ -1 +1 @@ -set(QT_REPO_MODULE_VERSION "6.1.2") +set(QT_REPO_MODULE_VERSION "6.1.3") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/.qmake.conf new/qtsvg-everywhere-src-6.1.3/.qmake.conf --- old/qtsvg-everywhere-src-6.1.2/.qmake.conf 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/.qmake.conf 2021-08-26 09:29:50.000000000 +0200 @@ -3,4 +3,4 @@ CONFIG += warning_clean DEFINES += QT_NO_FOREACH -MODULE_VERSION = 6.1.2 +MODULE_VERSION = 6.1.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/.tag new/qtsvg-everywhere-src-6.1.3/.tag --- old/qtsvg-everywhere-src-6.1.2/.tag 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/.tag 2021-08-26 09:29:50.000000000 +0200 @@ -1 +1 @@ -339289ca3de3a48ef0e0b07257d8686bf0f7c998 +e1fcdd864c0ff081f9c0a7ab87eb4c5989fc8e23 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/dependencies.yaml new/qtsvg-everywhere-src-6.1.3/dependencies.yaml --- old/qtsvg-everywhere-src-6.1.2/dependencies.yaml 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/dependencies.yaml 2021-08-26 09:29:50.000000000 +0200 @@ -1,4 +1,4 @@ dependencies: ../qtbase: - ref: 4dcedb8ca4ae0c9c533997074098297abbfcf1c3 + ref: b496064efab47743fff4eb22f68e3acb3315fd9d required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgfont_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgfont_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgfont_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgfont_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvgfont_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvggraphics_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvggraphics_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvggraphics_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvggraphics_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvggraphics_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvghandler_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvghandler_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvghandler_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvghandler_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvghandler_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgnode_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgnode_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgnode_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgnode_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvgnode_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgstructure_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgstructure_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgstructure_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgstructure_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvgstructure_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgstyle_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgstyle_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgstyle_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgstyle_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvgstyle_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgtinydocument_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgtinydocument_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qsvgtinydocument_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qsvgtinydocument_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qsvgtinydocument_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qtsvgglobal_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qtsvgglobal_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.2/QtSvg/private/qtsvgglobal_p.h 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.2/QtSvg/private/qtsvgglobal_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/svg/qtsvgglobal_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgfont_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgfont_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgfont_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgfont_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvgfont_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvggraphics_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvggraphics_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvggraphics_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvggraphics_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvggraphics_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvghandler_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvghandler_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvghandler_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvghandler_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvghandler_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgnode_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgnode_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgnode_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgnode_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvgnode_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgstructure_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgstructure_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgstructure_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgstructure_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvgstructure_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgstyle_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgstyle_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgstyle_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgstyle_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvgstyle_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgtinydocument_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgtinydocument_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qsvgtinydocument_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qsvgtinydocument_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qsvgtinydocument_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qtsvgglobal_p.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qtsvgglobal_p.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/6.1.3/QtSvg/private/qtsvgglobal_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/6.1.3/QtSvg/private/qtsvgglobal_p.h 2021-08-26 09:29:50.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/svg/qtsvgglobal_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvg/qtsvgversion.h new/qtsvg-everywhere-src-6.1.3/include/QtSvg/qtsvgversion.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvg/qtsvgversion.h 2021-06-28 15:12:12.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvg/qtsvgversion.h 2021-08-30 06:51:17.000000000 +0200 @@ -2,8 +2,8 @@ #ifndef QT_QTSVG_VERSION_H #define QT_QTSVG_VERSION_H -#define QTSVG_VERSION_STR "6.1.2" +#define QTSVG_VERSION_STR "6.1.3" -#define QTSVG_VERSION 0x060102 +#define QTSVG_VERSION 0x060103 #endif // QT_QTSVG_VERSION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/include/QtSvgWidgets/qtsvgwidgetsversion.h new/qtsvg-everywhere-src-6.1.3/include/QtSvgWidgets/qtsvgwidgetsversion.h --- old/qtsvg-everywhere-src-6.1.2/include/QtSvgWidgets/qtsvgwidgetsversion.h 2021-06-28 15:12:12.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/include/QtSvgWidgets/qtsvgwidgetsversion.h 2021-08-30 06:51:17.000000000 +0200 @@ -2,8 +2,8 @@ #ifndef QT_QTSVGWIDGETS_VERSION_H #define QT_QTSVGWIDGETS_VERSION_H -#define QTSVGWIDGETS_VERSION_STR "6.1.2" +#define QTSVGWIDGETS_VERSION_STR "6.1.3" -#define QTSVGWIDGETS_VERSION 0x060102 +#define QTSVGWIDGETS_VERSION 0x060103 #endif // QT_QTSVGWIDGETS_VERSION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/src/plugins/imageformats/svg/qsvgiohandler.cpp new/qtsvg-everywhere-src-6.1.3/src/plugins/imageformats/svg/qsvgiohandler.cpp --- old/qtsvg-everywhere-src-6.1.2/src/plugins/imageformats/svg/qsvgiohandler.cpp 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/src/plugins/imageformats/svg/qsvgiohandler.cpp 2021-08-26 09:29:50.000000000 +0200 @@ -181,14 +181,11 @@ t.translate(tr1.x(), tr1.y()); bounds = t.mapRect(bounds); } - if (image->size() != finalSize || !image->reinterpretAsFormat(QImage::Format_ARGB32_Premultiplied)) { - *image = QImage(finalSize, QImage::Format_ARGB32_Premultiplied); - if (!finalSize.isEmpty() && image->isNull()) { - qWarning("QSvgIOHandler: QImage allocation failed (size %i x %i)", finalSize.width(), finalSize.height()); + if (finalSize.isEmpty()) { + *image = QImage(); + } else { + if (!QImageIOHandler::allocateImage(finalSize, QImage::Format_ARGB32_Premultiplied, image)) return false; - } - } - if (!finalSize.isEmpty()) { image->fill(d->backColor.rgba()); QPainter p(image); d->r.render(&p, bounds); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/src/svg/qsvghandler.cpp new/qtsvg-everywhere-src-6.1.3/src/svg/qsvghandler.cpp --- old/qtsvg-everywhere-src-6.1.2/src/svg/qsvghandler.cpp 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/src/svg/qsvghandler.cpp 2021-08-26 09:29:50.000000000 +0200 @@ -725,15 +725,25 @@ return points; } -static inline void parseNumbersArray(const QChar *&str, QVarLengthArray<qreal, 8> &points) +static inline void parseNumbersArray(const QChar *&str, QVarLengthArray<qreal, 8> &points, + const char *pattern = nullptr) { + const size_t patternLen = qstrlen(pattern); while (str->isSpace()) ++str; while (isDigit(str->unicode()) || *str == QLatin1Char('-') || *str == QLatin1Char('+') || *str == QLatin1Char('.')) { - points.append(toDouble(str)); + if (patternLen && pattern[points.size() % patternLen] == 'f') { + // flag expected, may only be 0 or 1 + if (*str != QLatin1Char('0') && *str != QLatin1Char('1')) + return; + points.append(*str == QLatin1Char('0') ? 0.0 : 1.0); + ++str; + } else { + points.append(toDouble(str)); + } while (str->isSpace()) ++str; @@ -1354,7 +1364,8 @@ break; case FontSizeValue: { QSvgHandler::LengthType dummy; // should always be pixel size - fontStyle->setSize(parseLength(attributes.fontSize, dummy, handler)); + fontStyle->setSize(qMin(parseLength(attributes.fontSize, dummy, handler), + qreal(0xffff))); } break; default: @@ -1599,8 +1610,11 @@ ++str; QChar endc = *end; *const_cast<QChar *>(end) = u'\0'; // parseNumbersArray requires 0-termination that QStringView cannot guarantee + const char *pattern = nullptr; + if (pathElem == QLatin1Char('a') || pathElem == QLatin1Char('A')) + pattern = "rrrffrr"; QVarLengthArray<qreal, 8> arg; - parseNumbersArray(str, arg); + parseNumbersArray(str, arg, pattern); *const_cast<QChar *>(end) = endc; if (pathElem == QLatin1Char('z') || pathElem == QLatin1Char('Z')) arg.append(0);//dummy @@ -2349,6 +2363,27 @@ return true; } +static int parseClockValue(QStringView str, bool *ok) +{ + int res = 0; + int ms = 1000; + str = str.trimmed(); + if (str.endsWith(QLatin1String("ms"))) { + str.chop(2); + ms = 1; + } else if (str.endsWith(QLatin1String("s"))) { + str.chop(1); + } + double val = ms * toDouble(str, ok); + if (ok) { + if (val > std::numeric_limits<int>::min() && val < std::numeric_limits<int>::max()) + res = static_cast<int>(val); + else + *ok = false; + } + return res; +} + static bool parseAnimateColorNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler) @@ -2381,23 +2416,13 @@ } } - int ms = 1000; - beginStr = beginStr.trimmed(); - if (beginStr.endsWith(QLatin1String("ms"))) { - beginStr.chop(2); - ms = 1; - } else if (beginStr.endsWith(QLatin1String("s"))) { - beginStr.chop(1); - } - durStr = durStr.trimmed(); - if (durStr.endsWith(QLatin1String("ms"))) { - durStr.chop(2); - ms = 1; - } else if (durStr.endsWith(QLatin1String("s"))) { - durStr.chop(1); - } - int begin = static_cast<int>(toDouble(beginStr) * ms); - int end = static_cast<int>((toDouble(durStr) + begin) * ms); + bool ok = true; + int begin = parseClockValue(beginStr, &ok); + if (!ok) + return false; + int end = begin + parseClockValue(durStr, &ok); + if (!ok || end <= begin) + return false; QSvgAnimateColor *anim = new QSvgAnimateColor(begin, end, 0); anim->setArgs((targetStr == QLatin1String("fill")), colors); @@ -2487,24 +2512,13 @@ } } - int ms = 1000; - beginStr = beginStr.trimmed(); - if (beginStr.endsWith(QLatin1String("ms"))) { - beginStr.chop(2); - ms = 1; - } else if (beginStr.endsWith(QLatin1String("s"))) { - beginStr.chop(1); - } - int begin = static_cast<int>(toDouble(beginStr) * ms); - durStr = durStr.trimmed(); - if (durStr.endsWith(QLatin1String("ms"))) { - durStr.chop(2); - ms = 1; - } else if (durStr.endsWith(QLatin1String("s"))) { - durStr.chop(1); - ms = 1000; - } - int end = static_cast<int>(toDouble(durStr)*ms) + begin; + bool ok = true; + int begin = parseClockValue(beginStr, &ok); + if (!ok) + return false; + int end = begin + parseClockValue(durStr, &ok); + if (!ok || end <= begin) + return false; QSvgAnimateTransform::TransformType type = QSvgAnimateTransform::Empty; if (typeStr == QLatin1String("translate")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtsvg-everywhere-src-6.1.2/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp new/qtsvg-everywhere-src-6.1.3/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp --- old/qtsvg-everywhere-src-6.1.2/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp 2021-06-18 07:06:50.000000000 +0200 +++ new/qtsvg-everywhere-src-6.1.3/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp 2021-08-26 09:29:50.000000000 +0200 @@ -74,6 +74,7 @@ void fillRule(); void opacity(); void paths(); + void paths2(); void displayMode(); void strokeInherit(); void testFillInheritance(); @@ -1051,6 +1052,19 @@ } } +void tst_QSvgRenderer::paths2() +{ + const char *svg = + "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\">" + "<path d=\"M 3 8 A 5 5 0 1013 8\" id=\"path1\"/>" + "</svg>"; + + QByteArray data(svg); + QSvgRenderer renderer(data); + QVERIFY(renderer.isValid()); + QCOMPARE(renderer.boundsOnElement(QLatin1String("path1")).toRect(), QRect(3, 8, 10, 5)); +} + void tst_QSvgRenderer::displayMode() { static const char *svgs[] = {
