+2007-10-31 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Simon.
+
+ * QXmlStreamNamespaceDeclaration doesn't have the constructor we
+ want to use for Qt4.3. Reenable the old code path which is likely
+ to be dead as I have not checked if m_prefixToNamespaceMap is actually
+ used.
+ * Guard the entity resolver with the QT_VERSION as well.
+ * Partially reverts 369506279abdaa863e15efed649ca19e062f2c30 and
+ d2b54d0fc1b07a2480f4f7a1417abd7a636b0107 for Qt4.3.
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ * dom/XMLTokenizer.h:
+
2007-10-31 Holger Freyther <zecke@selfish.org>
Reviewed by Lars Knoll <lars@trolltech.com>.
}
#endif
-#ifdef USE_QXMLSTREAM
+#if defined(USE_QXMLSTREAM) && QT_VERSION >= 0x040400
class EntityResolver : public QXmlStreamEntityResolver
{
virtual QString resolveUndeclaredEntity(const QString &name);
if (elemStack.isEmpty())
return;
-#ifndef USE_QXMLSTREAM
+#if QT_VERSION < 0x040400
for (Element* element = elemStack.last(); !elemStack.isEmpty(); elemStack.removeLast()) {
if (NamedAttrMap* attrs = element->attributes()) {
for (unsigned i = 0; i < attrs->length(); i++) {
}
}
}
-#if QT_VERSION >= 0x040400
m_stream.addExtraNamespaceDeclarations(namespaces);
m_stream.setEntityResolver(new EntityResolver);
#endif
-#endif
}
XMLTokenizer::~XMLTokenizer()
String m_defaultNamespaceURI;
typedef HashMap<String, String> PrefixForNamespaceMap;
-#ifndef USE_QXMLSTREAM
PrefixForNamespaceMap m_prefixToNamespaceMap;
+#ifndef USE_QXMLSTREAM
OwnPtr<PendingCallbacks> m_pendingCallbacks;
#endif
SegmentedString m_pendingSrc;