summaryrefslogtreecommitdiffstats
path: root/tests/auto/qimagereader
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
commit8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d (patch)
treec328303e395088f88ba721e96bd6e09a008ad581 /tests/auto/qimagereader
parent71e333de0c258796a924b1d858253381d689cf19 (diff)
parentbb8142436bacf5a4fa31880b58a8b3b6bc7b4d5b (diff)
downloadQt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.zip
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.gz
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
Conflicts: src/plugins/imageformats/gif/qgifhandler.cpp
Diffstat (limited to 'tests/auto/qimagereader')
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 1fe1332..fe2a719 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -138,6 +138,9 @@ private slots:
void sizeBeforeRead_data();
void sizeBeforeRead();
+ void sizeBeforeFormat_data();
+ void sizeBeforeFormat();
+
void imageFormatBeforeRead_data();
void imageFormatBeforeRead();
@@ -706,6 +709,31 @@ void tst_QImageReader::sizeBeforeRead()
QCOMPARE(size, image.size());
}
+void tst_QImageReader::sizeBeforeFormat_data()
+{
+ imageFormat_data();
+}
+
+void tst_QImageReader::sizeBeforeFormat()
+{
+ QFETCH(QString, fileName);
+
+ QByteArray formatA, formatB;
+
+ {
+ QImageReader reader(prefix + fileName);
+ formatA = reader.format();
+ }
+
+ {
+ QImageReader reader(prefix + fileName);
+ QSize size = reader.size();
+ formatB = reader.format();
+ }
+
+ QCOMPARE(formatA, formatB);
+}
+
void tst_QImageReader::imageFormatBeforeRead_data()
{
imageFormat_data();