summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdom
diff options
context:
space:
mode:
authorJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
committerJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
commit9cacde74f7de702689725882633073e60c0a2baa (patch)
tree330d22dadbd28b14a7d8896823d1c33597e9993e /tests/auto/qdom
parent006c8e22075112eff6230d8168d716e44a9e29d5 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-9cacde74f7de702689725882633073e60c0a2baa.zip
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.gz
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.bz2
Merge remote-tracking branch 'qt/4.8'
Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
Diffstat (limited to 'tests/auto/qdom')
-rw-r--r--tests/auto/qdom/tst_qdom.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index f30d3bc..4093010 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -137,7 +137,6 @@ private slots:
private:
static QDomDocument generateRequest();
- static QDomDocument doc(const QString &title, const QByteArray &ba);
static int hasAttributesHelper( const QDomNode& node );
static bool compareDocuments( const QDomDocument &doc1, const QDomDocument &doc2 );
static bool compareNodes( const QDomNode &node1, const QDomNode &node2, bool deep );
@@ -1591,14 +1590,6 @@ void tst_QDom::reportDuplicateAttributes() const
QVERIFY2(!isSuccess, "Duplicate attributes are well-formedness errors, and should be reported as such.");
}
-QDomDocument tst_QDom::doc(const QString &title, const QByteArray &ba)
-{
- QDomDocument doc(title);
- const bool ret = doc.setContent(ba, true);
- Q_ASSERT(ret);
- return doc;
-}
-
void tst_QDom::namespacedAttributes() const
{
static const char *const xml =
@@ -1611,8 +1602,13 @@ void tst_QDom::namespacedAttributes() const
" <Title displayLabel='Title' >>>> SIMPLE BASIC OP - SEND - DUT AS SINK</Title>\n"
"</xan:td>\n";
- QDomDocument one = doc("document", xml);
- QDomDocument two = doc("document2", one.toByteArray(2));
+ QDomDocument one("document");
+ QString error;
+ bool docParsed = one.setContent(QByteArray(xml), true, &error);
+ QVERIFY2(docParsed, qPrintable(error));
+ QDomDocument two("document2");
+ docParsed = two.setContent(one.toByteArray(2), true, &error);
+ QVERIFY2(docParsed, qPrintable(error));
QVERIFY(isDeepEqual(one, two));
}