diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-05 19:46:59 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-05 19:46:59 (GMT) |
commit | e99a9e6b8ef0521e46742fe876766a6021f0121d (patch) | |
tree | 96a81faa8e17b625e18e1ef94c51d3efbfd16787 /tests | |
parent | 186f75db32bdc177bdbc192552cf7275d9723c85 (diff) | |
parent | 930c6554022cd30149912c92e88a7884609b44ba (diff) | |
download | Qt-e99a9e6b8ef0521e46742fe876766a6021f0121d.zip Qt-e99a9e6b8ef0521e46742fe876766a6021f0121d.tar.gz Qt-e99a9e6b8ef0521e46742fe876766a6021f0121d.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix build with Mesa 7.8's EGL implementatioon
Reset the byte order in the iconv codec after using it.
fix "using namespace" recursion crash
Fixed key mappings on X11
QDom: prevent infinite loop when cloning a DTD
QPrintPreviewDialog number of pages is partially blocked from view in OSX
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( f3110d2f94c825477afac054ed448e45d47f5670 )
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp | 60 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result | 24 | ||||
-rw-r--r-- | tests/auto/qdom/tst_qdom.cpp | 25 |
3 files changed, 109 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp index 42cc55b..a5b36ca 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp @@ -135,4 +135,64 @@ Q_OBJECT } }; +// QTBUG-8360 +namespace A { + +void foo() +{ + using namespace A; +} + +void goo() +{ + return QObject::tr("Bla"); +} + +} + + +namespace AA { +namespace B { + +using namespace AA; + +namespace C { + +class Test : public QObject { + Q_OBJECT +}; + +} + +} + +using namespace B; +using namespace C; + +void goo() +{ + AA::Test::tr("howdy?"); +} + +} + + +namespace A1 { +namespace B { + +class Test : public QObject { + Q_OBJECT +}; + +using namespace A1; + +void foo() +{ + B::B::B::Test::tr("yeeee-ha!"); +} + +} +} + + #include "main.moc" diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result index c1a34bd..94df9d3 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result @@ -2,6 +2,22 @@ <!DOCTYPE TS> <TS version="2.0"> <context> + <name>A1::B::Test</name> + <message> + <location filename="main.cpp" line="191"/> + <source>yeeee-ha!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>AA::B::C::Test</name> + <message> + <location filename="main.cpp" line="174"/> + <source>howdy?</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>Class</name> <message> <location filename="main.cpp" line="52"/> @@ -79,4 +95,12 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="main.cpp" line="148"/> + <source>Bla</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index d1b2ea5..caf08d6 100644 --- a/tests/auto/qdom/tst_qdom.cpp +++ b/tests/auto/qdom/tst_qdom.cpp @@ -131,6 +131,7 @@ private slots: void setContentWhitespace_data() const; void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const; + void cloneDTD_QTBUG8398() const; void cleanupTestCase() const; @@ -1912,5 +1913,29 @@ void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() co QVERIFY(true); } +void tst_QDom::cloneDTD_QTBUG8398() const +{ + QString dtd("<?xml version='1.0' encoding='UTF-8'?>\n" + "<!DOCTYPE first [\n" + "<!ENTITY secondFile SYSTEM 'second.xml'>\n" + "<!ENTITY thirdFile SYSTEM 'third.xml'>\n" + "]>\n" + "<first/>\n"); + QDomDocument domDocument; + QVERIFY(domDocument.setContent(dtd)); + QDomDocument domDocument2 = domDocument.cloneNode(true).toDocument(); + + // for some reason, our DOM implementation reverts the order of entities + QString expected("<?xml version='1.0' encoding='UTF-8'?>\n" + "<!DOCTYPE first [\n" + "<!ENTITY thirdFile SYSTEM 'third.xml'>\n" + "<!ENTITY secondFile SYSTEM 'second.xml'>\n" + "]>\n" + "<first/>\n"); + QString output; + QTextStream stream(&output); + domDocument2.save(stream, 0); + QCOMPARE(output, expected); +} QTEST_MAIN(tst_QDom) #include "tst_qdom.moc" |