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 2023-10-02 20:05:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-svg (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-svg.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-svg"

Mon Oct  2 20:05:50 2023 rev:25 rq:1114515 version:6.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-svg/qt6-svg.changes  2023-07-26 
13:23:32.459855650 +0200
+++ /work/SRC/openSUSE:Factory/.qt6-svg.new.28202/qt6-svg.changes       
2023-10-02 20:07:54.957932248 +0200
@@ -1,0 +2,6 @@
+Thu Sep 28 07:34:22 UTC 2023 - Christophe Marin <christo...@krop.fr>
+
+- Update to 6.5.3
+  * https://www.qt.io/blog/qt-6.5.3-released
+
+-------------------------------------------------------------------

Old:
----
  qtsvg-everywhere-src-6.5.2.tar.xz

New:
----
  qtsvg-everywhere-src-6.5.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qt6-svg.spec ++++++
--- /var/tmp/diff_new_pack.tsXzK8/_old  2023-10-02 20:07:56.053971664 +0200
+++ /var/tmp/diff_new_pack.tsXzK8/_new  2023-10-02 20:07:56.057971808 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define real_version 6.5.2
+%define real_version 6.5.3
 %define short_version 6.5
 %define tar_name qtsvg-everywhere-src
 %define tar_suffix %{nil}
@@ -27,12 +27,12 @@
 %endif
 #
 Name:           qt6-svg%{?pkg_suffix}
-Version:        6.5.2
+Version:        6.5.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)
 URL:            https://www.qt.io
-Source:         
https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
+Source:         
https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
 Source99:       qt6-svg-rpmlintrc
 BuildRequires:  pkgconfig
 BuildRequires:  qt6-core-private-devel

++++++ qtsvg-everywhere-src-6.5.2.tar.xz -> qtsvg-everywhere-src-6.5.3.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/.cmake.conf 
new/qtsvg-everywhere-src-6.5.3/.cmake.conf
--- old/qtsvg-everywhere-src-6.5.2/.cmake.conf  2023-07-07 05:20:38.000000000 
+0200
+++ new/qtsvg-everywhere-src-6.5.3/.cmake.conf  2023-09-24 09:06:30.000000000 
+0200
@@ -1,3 +1,3 @@
-set(QT_REPO_MODULE_VERSION "6.5.2")
+set(QT_REPO_MODULE_VERSION "6.5.3")
 set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
 set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/.tag 
new/qtsvg-everywhere-src-6.5.3/.tag
--- old/qtsvg-everywhere-src-6.5.2/.tag 2023-07-07 05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/.tag 2023-09-24 09:06:30.000000000 +0200
@@ -1 +1 @@
-73757fd3c46eb0bf499c5770bc846851c14e42ae
+220cd8c6261552f0fcf47061c64f862adae29b55
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/dependencies.yaml 
new/qtsvg-everywhere-src-6.5.3/dependencies.yaml
--- old/qtsvg-everywhere-src-6.5.2/dependencies.yaml    2023-07-07 
05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/dependencies.yaml    2023-09-24 
09:06:30.000000000 +0200
@@ -1,4 +1,4 @@
 dependencies:
   ../qtbase:
-    ref: af457a9f0f7eb1a2a7d11f495da508faab91a442
+    ref: 372eaedc5b8c771c46acc4c96e91bbade4ca3624
     required: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtsvg-everywhere-src-6.5.2/examples/svg/embedded/desktopservices/main.cpp 
new/qtsvg-everywhere-src-6.5.3/examples/svg/embedded/desktopservices/main.cpp
--- 
old/qtsvg-everywhere-src-6.5.2/examples/svg/embedded/desktopservices/main.cpp   
    2023-07-07 05:20:38.000000000 +0200
+++ 
new/qtsvg-everywhere-src-6.5.3/examples/svg/embedded/desktopservices/main.cpp   
    2023-09-24 09:06:30.000000000 +0200
@@ -6,8 +6,6 @@
 
 int main(int argc, char *argv[])
 {
-    Q_INIT_RESOURCE(desktopservices);
-
     QApplication app(argc, argv);
     DesktopWidget* myWidget = new DesktopWidget(0);
     myWidget->showMaximized();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtsvg-everywhere-src-6.5.2/examples/svg/embeddedsvgviewer/main.cpp 
new/qtsvg-everywhere-src-6.5.3/examples/svg/embeddedsvgviewer/main.cpp
--- old/qtsvg-everywhere-src-6.5.2/examples/svg/embeddedsvgviewer/main.cpp      
2023-07-07 05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/examples/svg/embeddedsvgviewer/main.cpp      
2023-09-24 09:06:30.000000000 +0200
@@ -9,7 +9,6 @@
 int main(int argc, char** argv)
 {
     QApplication app(argc, argv);
-    Q_INIT_RESOURCE(embeddedsvgviewer);
 
     QString filePath;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtsvg-everywhere-src-6.5.2/examples/svg/svgviewer/main.cpp 
new/qtsvg-everywhere-src-6.5.3/examples/svg/svgviewer/main.cpp
--- old/qtsvg-everywhere-src-6.5.2/examples/svg/svgviewer/main.cpp      
2023-07-07 05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/examples/svg/svgviewer/main.cpp      
2023-09-24 09:06:30.000000000 +0200
@@ -10,8 +10,6 @@
 
 int main(int argc, char **argv)
 {
-    Q_INIT_RESOURCE(svgviewer);
-
     QApplication app(argc, argv);
     QCoreApplication::setApplicationName("SVG Viewer");
     
QGuiApplication::setApplicationDisplayName(QCoreApplication::applicationName());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/src/svg/CMakeLists.txt 
new/qtsvg-everywhere-src-6.5.3/src/svg/CMakeLists.txt
--- old/qtsvg-everywhere-src-6.5.2/src/svg/CMakeLists.txt       2023-07-07 
05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/src/svg/CMakeLists.txt       2023-09-24 
09:06:30.000000000 +0200
@@ -23,7 +23,7 @@
         qsvgstructure.cpp qsvgstructure_p.h
         qsvgstyle.cpp qsvgstyle_p.h
         qsvgtinydocument.cpp qsvgtinydocument_p.h
-        qtsvgglobal.h
+        qtsvgglobal.h qtsvgglobal_p.h
     DEFINES
         QT_NO_USING_NAMESPACE
     LIBRARIES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/src/svg/qsvggraphics.cpp 
new/qtsvg-everywhere-src-6.5.3/src/svg/qsvggraphics.cpp
--- old/qtsvg-everywhere-src-6.5.2/src/svg/qsvggraphics.cpp     2023-07-07 
05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/src/svg/qsvggraphics.cpp     2023-09-24 
09:06:30.000000000 +0200
@@ -12,6 +12,7 @@
 #include <qscopedvaluerollback.h>
 #include <qtextcursor.h>
 #include <qtextdocument.h>
+#include <private/qfixed_p.h>
 
 #include <math.h>
 #include <limits.h>
@@ -36,6 +37,9 @@
     }                                                       \
     p->setOpacity(oldOpacity); }
 
+#ifndef QT_SVG_MAX_LAYOUT_SIZE
+#define QT_SVG_MAX_LAYOUT_SIZE (qint64(QFIXED_MAX / 2))
+#endif
 
 void QSvgAnimation::draw(QPainter *, QSvgExtraStates &)
 {
@@ -301,19 +305,51 @@
 QRectF QSvgText::bounds(QPainter *p, QSvgExtraStates &states) const
 {
     QRectF boundingRect;
-    draw_helper(p, states, &boundingRect);
+    if (precheck(p))
+        draw_helper(p, states, &boundingRect);
     return p->transform().mapRect(boundingRect);
 }
 
+bool QSvgText::precheck(QPainter *p) const
+{
+    qsizetype numChars = 0;
+    qreal originalFontSize = p->font().pointSizeF();
+    qreal maxFontSize = originalFontSize;
+    for (const QSvgTspan *span : std::as_const(m_tspans)) {
+        numChars += span->text().size();
+
+        QSvgFontStyle *style = static_cast<QSvgFontStyle 
*>(span->styleProperty(QSvgStyleProperty::FONT));
+        if (style != nullptr && style->qfont().pointSizeF() > maxFontSize)
+            maxFontSize = style->qfont().pointSizeF();
+    }
+
+    QFont font = p->font();
+    font.setPixelSize((100.0 / originalFontSize) * maxFontSize);
+    QFontMetricsF fm(font);
+    if (m_tspans.size() * fm.height() >= QT_SVG_MAX_LAYOUT_SIZE) {
+        qCWarning(lcSvgDraw) << "Text element too high to lay out, ignoring";
+        return false;
+    }
+
+    if (numChars * fm.maxWidth() >= QT_SVG_MAX_LAYOUT_SIZE) {
+        qCWarning(lcSvgDraw) << "Text element too wide to lay out, ignoring";
+        return false;
+    }
+
+    return true;
+}
+
 void QSvgText::draw(QPainter *p, QSvgExtraStates &states)
 {
-    draw_helper(p, states);
+    if (precheck(p))
+        draw_helper(p, states);
 }
 
 void QSvgText::draw_helper(QPainter *p, QSvgExtraStates &states, QRectF 
*boundingRect) const
 {
     const bool isPainting = (boundingRect == nullptr);
-    applyStyle(p, states);
+    if (isPainting)
+        applyStyle(p, states);
     if (!isPainting || shouldDrawNode(p, states)) {
         qreal oldOpacity = p->opacity();
         p->setOpacity(oldOpacity * states.fillOpacity);
@@ -486,7 +522,8 @@
         p->setWorldTransform(oldTransform, false);
         p->setOpacity(oldOpacity);
     }
-    revertStyle(p, states);
+    if (isPainting)
+        revertStyle(p, states);
 }
 
 void QSvgText::addText(const QString &text)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtsvg-everywhere-src-6.5.2/src/svg/qsvggraphics_p.h 
new/qtsvg-everywhere-src-6.5.3/src/svg/qsvggraphics_p.h
--- old/qtsvg-everywhere-src-6.5.2/src/svg/qsvggraphics_p.h     2023-07-07 
05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/src/svg/qsvggraphics_p.h     2023-09-24 
09:06:30.000000000 +0200
@@ -171,6 +171,7 @@
     QRectF bounds(QPainter *p, QSvgExtraStates &states) const override;
 
 private:
+    bool precheck(QPainter *p) const;
     void draw_helper(QPainter *p, QSvgExtraStates &states, QRectF 
*boundingRect = nullptr) const;
 
     static QSvgTspan * const LINEBREAK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtsvg-everywhere-src-6.5.2/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp 
new/qtsvg-everywhere-src-6.5.3/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
--- old/qtsvg-everywhere-src-6.5.2/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp 
2023-07-07 05:20:38.000000000 +0200
+++ new/qtsvg-everywhere-src-6.5.3/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp 
2023-09-24 09:06:30.000000000 +0200
@@ -578,6 +578,10 @@
                       "</g>"
                       "<text id=\"textA\" x=\"50\" y=\"100\">Lorem 
ipsum</text>"
                       "<text id=\"textB\" transform=\"matrix(1 0 0 1 50 
100)\">Lorem ipsum</text>"
+                      "<g id=\"textGroup\">"
+                        "<text id=\"textC\" transform=\"matrix(1 0 0 2 20 
10)\">Lorem ipsum</text>"
+                        "<text id=\"textD\" transform=\"matrix(1 0 0 2 30 
40)\">Lorem ipsum</text>"
+                      "</g>"
                     "</svg>");
     
     qreal sqrt2 = qSqrt(2);
@@ -593,6 +597,13 @@
     QRectF textBoundsA = renderer.boundsOnElement(QLatin1String("textA"));
     QVERIFY(!textBoundsA.isEmpty());
     QCOMPARE(renderer.boundsOnElement(QLatin1String("textB")), textBoundsA);
+
+    QRect cBounds = renderer.boundsOnElement(QLatin1String("textC")).toRect();
+    QRect dBounds = renderer.boundsOnElement(QLatin1String("textD")).toRect();
+    QVERIFY(!cBounds.isEmpty());
+    QCOMPARE(cBounds.size(), dBounds.size());
+    QRect groupBounds = 
renderer.boundsOnElement(QLatin1String("textGroup")).toRect();
+    QCOMPARE(groupBounds, cBounds | dBounds);
 }
 
 void tst_QSvgRenderer::gradientStops() const

Reply via email to