[Amarok] f686a5e fix the build problem on Qt-4.5 systems (such as o

Jakob Kummerow jakob.kummerow at gmail.com
Sat Jun 5 17:51:04 CEST 2010


commit f686a5ef80092eaac24740b8980bae1e81dff421
Author: Jakob Kummerow <jakob.kummerow at gmail.com>
Date:   Sat Jun 5 17:57:49 2010 +0200

    fix the build problem on Qt-4.5 systems (such as our Hudson server)
    
    CCMAIL: amarok-devel at kde.org

diff --git a/src/dynamic/Bias.cpp b/src/dynamic/Bias.cpp
index 14db98e..6acf34f 100644
--- a/src/dynamic/Bias.cpp
+++ b/src/dynamic/Bias.cpp
@@ -75,7 +75,17 @@ Dynamic::Bias::fromXml( QDomElement e )
                     QTextStream rawXmlStream( &rawXml );
                     includeElement.save( rawXmlStream, 0 );
                     QXmlStreamReader reader(rawXml);
+#if QT_VERSION >= 0x040600
                     reader.readNextStartElement();
+#else
+                    // QXmlStreamReader::readNextStartElement doesn't exist in Qt-4.5
+                    // this is the inlined method body, adapted from lines 656 - 665 of
+                    // http://qt.gitorious.org/qt/qt/blobs/4.6/src/corelib/xml/qxmlstream.cpp
+                    while ( reader.readNext() != QXmlStreamReader::Invalid ) {
+                        if ( reader.isEndElement() || reader.isStartElement() )
+                            break;
+                    }
+#endif
 
                     filter = XmlQueryReader::readFilter(&reader);
                 }


More information about the Amarok-devel mailing list