Changeset View
Changeset View
Standalone View
Standalone View
src/extractors/xmlextractor.cpp
Show All 33 Lines | |||||
34 | inline QString ccNS() { return QStringLiteral("http://creativecommons.org/ns#"); } | 34 | inline QString ccNS() { return QStringLiteral("http://creativecommons.org/ns#"); } | ||
35 | 35 | | |||
36 | void extractSvgText(KFileMetaData::ExtractionResult* result, const QDomElement &node) | 36 | void extractSvgText(KFileMetaData::ExtractionResult* result, const QDomElement &node) | ||
37 | { | 37 | { | ||
38 | if (node.namespaceURI() != svgNS()) { | 38 | if (node.namespaceURI() != svgNS()) { | ||
39 | return; | 39 | return; | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | if (node.localName() == QLatin1String("g")) { | 42 | if ((node.localName() == QLatin1String("g")) || | ||
43 | (node.localName() == QLatin1String("a"))) { | ||||
43 | QDomElement e = node.firstChildElement(); | 44 | QDomElement e = node.firstChildElement(); | ||
44 | for (; !e.isNull(); e = e.nextSiblingElement()) { | 45 | for (; !e.isNull(); e = e.nextSiblingElement()) { | ||
45 | extractSvgText(result, e); | 46 | extractSvgText(result, e); | ||
46 | } | 47 | } | ||
47 | } else if (node.localName() == QLatin1String("text")) { | 48 | } else if (node.localName() == QLatin1String("text")) { | ||
48 | qCDebug(KFILEMETADATA_LOG) << node.text(); | 49 | qCDebug(KFILEMETADATA_LOG) << node.text(); | ||
49 | result->append(node.text()); | 50 | result->append(node.text()); | ||
50 | } | 51 | } | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |