Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
3a5eb5cac3
!25 [sync] PR-24: update to version 5.15.10-1
From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-08-30 09:18:42 +00:00
huayadong
862155e6d4 update to version 5.15.10-1
(cherry picked from commit da0d53c36db8a31da6db8fd556458757101ce497)
2023-08-24 18:48:37 +08:00
openeuler-ci-bot
2de3bda776
!14 Fix CVE-2021-45930
Merge pull request !14 from wk333/master
2022-01-14 01:44:56 +00:00
wk333
1842b4af4b Fix CVE-2021-45930 2022-01-13 14:58:37 +08:00
openeuler-ci-bot
a0a7dab5ea
!13 update to upstream version 5.15.2
Merge pull request !13 from pei-jiankang/master
2022-01-10 06:03:53 +00:00
pei-jiankang
247f178ad0 update to upstream version 5.15.2 2022-01-10 11:03:41 +08:00
openeuler-ci-bot
48db4c3684 !9 允许svg格式中不带‘type’的<style>节点
From: @kylinsecos_admin
Reviewed-by: @yanglijin
Signed-off-by: @yanglijin,@yanglijin
2021-12-08 11:36:27 +00:00
liuxinhao
10fde67353 解析svg图片时,允许不带属性的<style>的节点
根据https://www.w3.org/TR/SVG/styling.html#StyleElement,`type`属性可以省略。

Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
2021-12-08 19:13:03 +08:00
openeuler-ci-bot
b26725b99f !5 Fix Source0
From: @kkkl12
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-09-14 15:26:52 +08:00
kkkl12
8bc6afc420 Fix Source0 2020-09-14 15:14:59 +08:00
6 changed files with 100 additions and 39 deletions

View File

@ -1,26 +1,43 @@
Name: qt5-qtsvg
Version: 5.11.1
Release: 4
Summary: Qt GUI toolkit for rendering and displaying SVG
License: LGPLv2 with exceptions or GPLv3 with exceptions
Url: http://www.qt.io
Source0: https://download.qt.io/archive/qt/5.11/%{version}/submodules/qtsvg-everywhere-src-%{version}.tar.xz
Patch0001: qtsvg-opensource-src-5.6.0-beta1-example-install.patch
BuildRequires: qt5-qtbase-devel >= %{version} pkgconfig(zlib) qt5-qtbase-private-devel
%{?_qt5:Requires: %{_qt5} = %{_qt5_version}}
%global qt_module qtsvg
Summary: Qt5 - Support for rendering and displaying SVG
Name: qt5-%{qt_module}
Version: 5.15.10
Release: 1
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
Url: http://www.qt.io
%global majmin %(echo %{version} | cut -d. -f1-2)
Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz
Patch0: qtsvg-CVE-2023-32573.patch
BuildRequires: make
BuildRequires: qt5-qtbase-devel >= %{version}
BuildRequires: pkgconfig(zlib)
BuildRequires: qt5-qtbase-private-devel
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
%description
The Qt SVG module provides functionality for displaying SVG images in
widget, and to create SVG files using drawing commands.
Scalable Vector Graphics (SVG) is an XML-based language for describing
two-dimensional vector graphics. Qt provides classes for rendering and
displaying SVG drawings in widgets and on other paint devices.
%package devel
Summary: Library and header files of libdwarf for qt5-qtsvg
Requires: %{name} = %{version}-%{release} qt5-qtbase-devel
Provides: %{name}-examples = %{version}-%{release}
Obsoletes: %{name}-examples < %{version}-%{release}
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: qt5-qtbase-devel%{?_isa}
%description devel
qt5-qtsvg-devel provides libraries and header files for qt5-qtsvg.
%{summary}.
%package examples
Summary: Programming examples for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description examples
%{summary}.
%prep
%autosetup -n qtsvg-everywhere-src-%{version} -p1
@ -43,23 +60,45 @@ for prl_file in libQt5*.prl ; do
done
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
%license LICENSE.*
%dir %{_qt5_libdir}/cmake/Qt5Svg/
%{_qt5_libdir}/{libQt5Svg.so.5*,cmake/Qt5Svg/Qt5Svg_*Plugin.cmake}
%{_qt5_plugindir}/{iconengines/libqsvgicon.so,imageformats/libqsvg.so}
%{_qt5_libdir}/libQt5Svg.so.5*
%{_qt5_plugindir}/iconengines/libqsvgicon.so
%{_qt5_plugindir}/imageformats/libqsvg.so
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QSvg*Plugin.cmake
%files devel
%{_qt5_examplesdir}/
%{_qt5_headerdir}/QtSvg/
%{_qt5_libdir}/libQt5Svg.so
%{_qt5_libdir}/libQt5Svg.prl
%dir %{_qt5_libdir}/cmake/Qt5Svg/
%{_qt5_libdir}/cmake/Qt5Svg/Qt5SvgConfig*.cmake
%{_qt5_libdir}/{libQt5Svg.so,libQt5Svg.prl,pkgconfig/Qt5Svg.pc}
%{_qt5_libdir}/pkgconfig/Qt5Svg.pc
%{_qt5_archdatadir}/mkspecs/modules/qt_lib_svg*.pri
%files examples
%{_qt5_examplesdir}/
%changelog
* Mon Aug 21 2023 huayadong <huayadong@kylinos.cn> - 5.15.10-1
- update to version 5.15.10-1
* Thu Jan 13 2022 wangkai <wangkai385@huawei.com> - 5.15.2-2
- Fix CVE-2021-45930
* Wed Dec 29 2021 peijiankang <peijiankang@kylinos.cn> - 5.15.2-1
- update to upstream version 5.15.2
* Wed Dec 08 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 5.11.1-6
- Allow style without type attribute
* Mon Sep 14 2020 liuweibo <liuweibo10@huawei.com> - 5.11.1-5
- Fix Source0
* Fri Jan 10 2020 zhouyihang <zhouyihang1@huawei.com> - 5.11.1-4
- change the source to valid address

View File

@ -1,4 +1,4 @@
version_control: git
src_repo: https://code.qt.io/qt/qtsvg.git
tag_prefix: ^v
seperator: .
tag_prefix: "^v"
separator: "."

View File

@ -0,0 +1,34 @@
--- a/src/svg/qsvgfont_p.h
+++ b/src/svg/qsvgfont_p.h
@@ -74,6 +74,7 @@ public:
class Q_SVG_PRIVATE_EXPORT QSvgFont : public QSvgRefCounted
{
public:
+ static constexpr qreal DEFAULT_UNITS_PER_EM = 1000;
QSvgFont(qreal horizAdvX);
void setFamilyName(const QString &name);
@@ -86,9 +87,7 @@ public:
void draw(QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const;
public:
QString m_familyName;
- qreal m_unitsPerEm;
- qreal m_ascent;
- qreal m_descent;
+ qreal m_unitsPerEm = DEFAULT_UNITS_PER_EM;
qreal m_horizAdvX;
QHash<QChar, QSvgGlyph> m_glyphs;
};
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2668,7 +2668,7 @@ static bool parseFontFaceNode(QSvgStyleProperty *parent,
qreal unitsPerEm = toDouble(unitsPerEmStr);
if (!unitsPerEm)
- unitsPerEm = 1000;
+ unitsPerEm = QSvgFont::DEFAULT_UNITS_PER_EM;
if (!name.isEmpty())
font->setFamilyName(name);

Binary file not shown.

Binary file not shown.

View File

@ -1,12 +0,0 @@
diff --git a/examples/svg/richtext/textobject/textobject.pro b/examples/svg/richtext/textobject/textobject.pro
index 8892ae7..f9ec7c6 100644
--- a/examples/svg/richtext/textobject/textobject.pro
+++ b/examples/svg/richtext/textobject/textobject.pro
@@ -14,6 +14,6 @@ INSTALLS += target
wince*{
filesToDeploy.files = files/*.svg
- filesToDeploy.path = files
+ filesToDeploy.path = $$[QT_INSTALL_EXAMPLES]/svg/richtext/textobject/files
DEPLOYMENT += filesToDeploy
}