summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Rauter <matthias.rauter@qt.io>2024-01-17 15:15:19 +0100
committerMatthias Rauter <matthias.rauter@qt.io>2024-01-24 10:01:13 +0100
commitfd8224cdb815d16d481d21b65871887e13aae98c (patch)
tree41b8f684cc7eb36c8f5f4a9d173dbda41fed6c71 /src
parentb421481becc99dc43317c4d869db526ead880305 (diff)
Fix a bug where description and title were rendered
Parts of SvgHandler wrongfully claim that description and title are handled. However, this is not the case and the current element is not invalidated. This in turn leads to the acceptance of the text in the respective element which is added to the parent and in case of text rendered. This patch removes the claim that these elements are handled which is enough to fix the bug. Fixes: QTBUG-120233 Pick-to: 6.7 Change-Id: I60eab19c96a556647c3e96526f7d1135cbdac91e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvghandler.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 194096e..f28ba55 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2653,14 +2653,6 @@ static QSvgNode *createDefsNode(QSvgNode *parent,
return defs;
}
-static bool parseDescNode(QSvgNode *parent,
- const QXmlStreamAttributes &attributes,
- QSvgHandler *)
-{
- Q_UNUSED(parent); Q_UNUSED(attributes);
- return true;
-}
-
static bool parseDiscardNode(QSvgNode *parent,
const QXmlStreamAttributes &attributes,
QSvgHandler *)
@@ -4128,14 +4120,6 @@ static QSvgNode *createTspanNode(QSvgNode *parent,
return new QSvgTspan(parent);
}
-static bool parseTitleNode(QSvgNode *parent,
- const QXmlStreamAttributes &attributes,
- QSvgHandler *)
-{
- Q_UNUSED(parent); Q_UNUSED(attributes);
- return true;
-}
-
static QSvgNode *createUseNode(QSvgNode *parent,
const QXmlStreamAttributes &attributes,
QSvgHandler *handler)
@@ -4318,7 +4302,6 @@ static ParseMethod findUtilFactory(const QString &name, QtSvg::Options options)
if (ref == QLatin1String("udio")) return parseAudioNode;
break;
case 'd':
- if (ref == QLatin1String("esc")) return parseDescNode;
if (ref == QLatin1String("iscard")) return parseDiscardNode;
break;
case 'f':
@@ -4344,7 +4327,6 @@ static ParseMethod findUtilFactory(const QString &name, QtSvg::Options options)
break;
case 't':
if (ref == QLatin1String("break")) return parseTbreakNode;
- if (ref == QLatin1String("itle")) return parseTitleNode;
break;
default:
break;
@@ -4746,7 +4728,7 @@ bool QSvgHandler::startElement(const QString &localName,
qCWarning(lcSvgHandler, "%s", msgProblemParsing(localName, xml).constData());
}
} else {
- //qCWarning(lcSvgHandler) <<"Skipping unknown element!"<<namespaceURI<<"::"<<localName;
+ qCDebug(lcSvgHandler) << "Skipping unknown element" << localName;
m_skipNodes.push(Unknown);
return true;
}