summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-08-20 15:14:37 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-08-20 15:22:00 (GMT)
commita1381dcce6ad42567d88d628934b55873c3687e9 (patch)
treec90c7399be3ff5d584493fa99470d30c9205df76 /tests
parent4148769f9465449cb537fde193912a5a071ddd8a (diff)
downloadQt-a1381dcce6ad42567d88d628934b55873c3687e9.zip
Qt-a1381dcce6ad42567d88d628934b55873c3687e9.tar.gz
Qt-a1381dcce6ad42567d88d628934b55873c3687e9.tar.bz2
Revised fix for pixmap loading
Change 2c8f9dee611 had an unwelcome side-effect and was reverted. Since we do have the undocumented behavior that we scan for all possible extensions when QPixmap is provided with a filename without extensions we could not simply exit if the file did not exist. We now check if there are extensions before doing so. Reviewed-by: gabi Task-number: QTBUG-11137
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index e461b64..7e0f466 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -1558,6 +1558,8 @@ void tst_QPixmap::loadFromDataImage_data()
const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
#endif
QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png";
+ // When no extension is provided we try all extensions that has been registered by image providers
+ QTest::newRow("designer_argb32") << prefix + "/designer_argb32.png";
QTest::newRow("designer_indexed8_no_alpha.png") << prefix + "/designer_indexed8_no_alpha.png";
QTest::newRow("designer_indexed8_with_alpha.png") << prefix + "/designer_indexed8_with_alpha.png";
QTest::newRow("designer_rgb32.png") << prefix + "/designer_rgb32.png";