* QXmlStreamNamespaceDeclaration doesn't have the constructor we
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 11:15:28 +0000 (11:15 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 11:15:28 +0000 (11:15 +0000)
  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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27317 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/dom/XMLTokenizer.cpp
WebCore/dom/XMLTokenizer.h

index 785bc3d20ea81459f5ac870290db6bf3d091ca91..b11790047d1c6930e7ef77f532c23b1bc883a76b 100644 (file)
@@ -1,3 +1,19 @@
+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>.
index 2811e90e4297038fbb48ba1070e550449bf28635..5e5a8b1ded999377af96f3e832f3bf8785b429a9 100644 (file)
@@ -446,7 +446,7 @@ static xmlParserCtxtPtr createStringParser(xmlSAXHandlerPtr handlers, void* user
 }
 #endif
 
-#ifdef USE_QXMLSTREAM
+#if defined(USE_QXMLSTREAM) && QT_VERSION >= 0x040400
 class EntityResolver : public QXmlStreamEntityResolver
 {
     virtual QString resolveUndeclaredEntity(const QString &name);
@@ -539,7 +539,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
     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++) {
@@ -564,11 +564,9 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
             }
         }
     }
-#if QT_VERSION >= 0x040400
     m_stream.addExtraNamespaceDeclarations(namespaces);
     m_stream.setEntityResolver(new EntityResolver);
 #endif
-#endif
 }
 
 XMLTokenizer::~XMLTokenizer()
index 55c67fb7a836632a2aaa1b38f34252e86b8747e4..a595d519fba5feb8ce51912c4ef43e1feec8d793 100644 (file)
@@ -160,8 +160,8 @@ namespace WebCore {
         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;