diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 12:05:36 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 12:05:36 (GMT) |
commit | 51c2b10379b0bbed5804f0f8e2eca82e5bb4d0bf (patch) | |
tree | 54d66d0455c3266020b58a13f7422c5c886bc230 /tests/auto | |
parent | 4a170bdbb143cfd4cde5c636bbe81cbee45a063f (diff) | |
parent | 25a2df08706679d89780fae9216508ef0f094221 (diff) | |
download | Qt-51c2b10379b0bbed5804f0f8e2eca82e5bb4d0bf.zip Qt-51c2b10379b0bbed5804f0f8e2eca82e5bb4d0bf.tar.gz Qt-51c2b10379b0bbed5804f0f8e2eca82e5bb4d0bf.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team: (27 commits)
Remove undefined symbol from tst_qwindowsurface.
Fix def files
Fixes: some text fields in PNG image files were not read
Add an overloading function to flush().
Remove the check on flushRequested.
Only enable RightToLeft forcing in OS X 10.6 and skip the test
Make getters for staticContentsSupport and partialUpdateSupport virtual
Change the way the unified toolbar is flushed.
Add the ability to remove a toolbar from the unified toolbar.
Move the Mac specific behavior in #ifdef.
Remove useless variable.
Optimize the rendering path for the unified toolbar.
Remove useless statements.
Force the repaint during live resize.
Remove useless function.
Remove useless variables.
Disable subtractOpaqueSiblings when in the unified toolbar.
Move all display: utility functions.
Force the display: in the unified toolbar.
Remove useless displayIfNeeded: definition.
...
Diffstat (limited to 'tests/auto')
-rwxr-xr-x | tests/auto/qimagereader/images/txts.png | bin | 0 -> 5413 bytes | |||
-rw-r--r-- | tests/auto/qimagereader/qimagereader.qrc | 1 | ||||
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 28 | ||||
-rw-r--r-- | tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qwindowsurface/tst_qwindowsurface.cpp | 48 |
5 files changed, 32 insertions, 48 deletions
diff --git a/tests/auto/qimagereader/images/txts.png b/tests/auto/qimagereader/images/txts.png Binary files differnew file mode 100755 index 0000000..99be1eb --- /dev/null +++ b/tests/auto/qimagereader/images/txts.png diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 5536b38..632b73a 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -64,5 +64,6 @@ <file>images/corrupt.svg</file> <file>images/corrupt.svgz</file> <file>images/qtbug13653-no_eoi.jpg</file> + <file>images/txts.png</file> </qresource> </RCC> diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index f02fd6a..5db5f56 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -183,6 +183,9 @@ private slots: void saveFormat_data(); void saveFormat(); + void readText_data(); + void readText(); + void preserveTexts_data(); void preserveTexts(); }; @@ -1968,6 +1971,31 @@ void tst_QImageReader::saveFormat() } +void tst_QImageReader::readText_data() +{ + QTest::addColumn<QString>("fileName"); + QTest::addColumn<QString>("key"); + QTest::addColumn<QString>("text"); + + QTest::newRow("png, tEXt before img") << "txts.png" << "Title" << "PNG"; + QTest::newRow("png, zTXt before img") << "txts.png" << "Comment" << "Some compressed text."; + QTest::newRow("png, tEXt after img") << "txts.png" << "Disclaimer" << "For testing only."; + QTest::newRow("png, zTXt after img") << "txts.png" << "Description" << "Rendered by Persistence of Vision (tm) Ray Tracer"; +} + + +void tst_QImageReader::readText() +{ + QFETCH(QString, fileName); + QFETCH(QString, key); + QFETCH(QString, text); + + QImage img(prefix + fileName); + QVERIFY(img.textKeys().contains(key)); + QCOMPARE(img.text(key), text); +} + + void tst_QImageReader::preserveTexts_data() { QTest::addColumn<QString>("text"); diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp index 54c07a2..1952796 100644 --- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp @@ -1194,6 +1194,9 @@ void tst_QTextScriptEngine::mirroredChars_data() void tst_QTextScriptEngine::mirroredChars() { +#if defined(Q_WS_MAC) + QSKIP("Not supported on Mac", SkipAll); +#endif QFETCH(int, hintingPreference); QFont font; diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp index b309917..b209258 100644 --- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp +++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp @@ -66,7 +66,6 @@ private slots: void getSetWindowSurface(); void flushOutsidePaintEvent(); void grabWidget(); - void staticContentsAndPartialUpdateSupport(); }; class MyWindowSurface : public QWindowSurface @@ -82,8 +81,6 @@ public: /* nothing */ } - using QWindowSurface::setStaticContentsSupport; - using QWindowSurface::setPartialUpdateSupport; private: QImage image; }; @@ -283,51 +280,6 @@ void tst_QWindowSurface::grabWidget() QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white)); } -void tst_QWindowSurface::staticContentsAndPartialUpdateSupport() -{ - QWidget widget; - MyWindowSurface surface(&widget); - - // Default values. - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: YES, Static: YES - surface.setStaticContentsSupport(true); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(surface.hasStaticContentsSupport()); - - // Static contents requires support for partial updates. - // We simply ingore bad combinations and spit out a warning. - - // CONFLICT: Partial: NO, Static: YES - QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support"); - surface.setPartialUpdateSupport(false); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(surface.hasStaticContentsSupport()); - - // Partial: YES, Static: NO - surface.setStaticContentsSupport(false); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: NO, Static: NO - surface.setPartialUpdateSupport(false); - QVERIFY(!surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // CONFLICT: Partial: NO, Static: YES - QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setStaticContentsSupport: static contents support requires partial update support"); - surface.setStaticContentsSupport(true); - QVERIFY(!surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: YES, Static: NO - surface.setPartialUpdateSupport(true); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); -} - QTEST_MAIN(tst_QWindowSurface) #else // Q_WS_MAC |