diff options
| author | Robert Löhning <robert.loehning@qt.io> | 2026-09-21 17:51:45 +0200 |
|---|---|---|
| committer | Robert Löhning <robert.loehning@qt.io> | 2026-09-24 18:59:58 +0000 |
| commit | fdfae22bc7fa939eefe53a818ef94350d99c91fd (patch) | |
| tree | 7f211dd5787d13a270477b5bfe15456a370aa6ee | |
| parent | 2f48bf43f725c34d0fa1da8bb17ccb09fb990531 (diff) | |
Replace another call to QSvgNode::document()
It was slow and should be removed altogether.
All other calls were already replaced in
b10cd4252550b7471b264b83e8ffaa7b07f67613,
but while that was still being prepared,
cbdacc91486bbaad2b66669ed7cd69020f68e1ab,
introduced another one.
Pick-to: 6.12
Change-Id: I2577a97546e4ce7cec37e82c0d56987a3f6364e5
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
| -rw-r--r-- | src/quickvectorimage/generator/qsvgvisitorimpl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp index 428efc3a57..e698065a68 100644 --- a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp +++ b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp @@ -32,6 +32,7 @@ #include <QtCore/qscopedvaluerollback.h> #include <QtCore/qxmlstream.h> +#include <QtSvg/private/qsvgdocument_p.h> #include <QtSvg/private/qsvgstyle_p.h> #include <QtSvg/private/qsvgfilter_p.h> @@ -819,8 +820,9 @@ void QSvgVisitorImpl::visitTextNode(const QSvgText *node) QSvgFont *svgFont = nullptr; QString svgFontFamily; if (fontStyle) { + Q_ASSERT(m_doc); svgFontFamily = fontStyle->qfont().family(); - svgFont = node->document()->svgFont(svgFontFamily); + svgFont = m_doc->svgFont(svgFontFamily); } QFontEngine *fontEngine = nullptr; |
