summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-11-18 00:30:38 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-11-18 00:30:38 +0000
commit7c05a0cc9904e7a42c20e0b7751082f7f812e28d (patch)
tree13084b5ba01a0996eac2c403b432809db78f1ede /tests
parentb72d1db446231311a7ee855ed3e0fbb64a62ea06 (diff)
parent17dc773221c402308ddf15bcdb622b00ab7a95c3 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp25
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp6
2 files changed, 21 insertions, 10 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 08f48abd20..5574a92ad9 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -2822,15 +2822,17 @@ void tst_QImage::exifOrientation_data()
{
QTest::addColumn<QString>("fileName");
QTest::addColumn<int>("orientation");
- QTest::newRow("Orientation 1, Intel format") << m_prefix + "jpeg_exif_orientation_value_1.jpg" << (int)QImageIOHandler::TransformationNone;
- QTest::newRow("Orientation 2, Intel format") << m_prefix + "jpeg_exif_orientation_value_2.jpg" << (int)QImageIOHandler::TransformationMirror;
- QTest::newRow("Orientation 3, Intel format") << m_prefix + "jpeg_exif_orientation_value_3.jpg" << (int)QImageIOHandler::TransformationRotate180;
- QTest::newRow("Orientation 4, Intel format") << m_prefix + "jpeg_exif_orientation_value_4.jpg" << (int)QImageIOHandler::TransformationFlip;
- QTest::newRow("Orientation 5, Intel format") << m_prefix + "jpeg_exif_orientation_value_5.jpg" << (int)QImageIOHandler::TransformationFlipAndRotate90;
- QTest::newRow("Orientation 6, Intel format") << m_prefix + "jpeg_exif_orientation_value_6.jpg" << (int)QImageIOHandler::TransformationRotate90;
- QTest::newRow("Orientation 6, Motorola format") << m_prefix + "jpeg_exif_orientation_value_6_motorola.jpg" << (int)QImageIOHandler::TransformationRotate90;
- QTest::newRow("Orientation 7, Intel format") << m_prefix + "jpeg_exif_orientation_value_7.jpg" << (int)QImageIOHandler::TransformationMirrorAndRotate90;
- QTest::newRow("Orientation 8, Intel format") << m_prefix + "jpeg_exif_orientation_value_8.jpg" << (int)QImageIOHandler::TransformationRotate270;
+ QTest::addColumn<int>("dpmx");
+ QTest::addColumn<int>("dpmy");
+ QTest::newRow("Orientation 1, Intel format") << m_prefix + "jpeg_exif_orientation_value_1.jpg" << (int)QImageIOHandler::TransformationNone << 39 << 39;
+ QTest::newRow("Orientation 2, Intel format") << m_prefix + "jpeg_exif_orientation_value_2.jpg" << (int)QImageIOHandler::TransformationMirror << 39 << 39;
+ QTest::newRow("Orientation 3, Intel format") << m_prefix + "jpeg_exif_orientation_value_3.jpg" << (int)QImageIOHandler::TransformationRotate180 << 39 << 39;
+ QTest::newRow("Orientation 4, Intel format") << m_prefix + "jpeg_exif_orientation_value_4.jpg" << (int)QImageIOHandler::TransformationFlip << 39 << 39;
+ QTest::newRow("Orientation 5, Intel format") << m_prefix + "jpeg_exif_orientation_value_5.jpg" << (int)QImageIOHandler::TransformationFlipAndRotate90 << 39 << 39;
+ QTest::newRow("Orientation 6, Intel format") << m_prefix + "jpeg_exif_orientation_value_6.jpg" << (int)QImageIOHandler::TransformationRotate90 << 39 << 39;
+ QTest::newRow("Orientation 6, Motorola format") << m_prefix + "jpeg_exif_orientation_value_6_motorola.jpg" << (int)QImageIOHandler::TransformationRotate90 << 39 << 39;
+ QTest::newRow("Orientation 7, Intel format") << m_prefix + "jpeg_exif_orientation_value_7.jpg" << (int)QImageIOHandler::TransformationMirrorAndRotate90 << 39 << 39;
+ QTest::newRow("Orientation 8, Intel format") << m_prefix + "jpeg_exif_orientation_value_8.jpg" << (int)QImageIOHandler::TransformationRotate270 << 39 << 39;
}
QT_BEGIN_NAMESPACE
@@ -2842,14 +2844,17 @@ void tst_QImage::exifOrientation()
{
QFETCH(QString, fileName);
QFETCH(int, orientation);
+ QFETCH(int, dpmx);
+ QFETCH(int, dpmy);
QImageReader imageReader(fileName);
imageReader.setAutoTransform(true);
QCOMPARE(imageReader.transformation(), orientation);
QImage img = imageReader.read();
+ QCOMPARE(img.dotsPerMeterX(), dpmx);
+ QCOMPARE(img.dotsPerMeterY(), dpmy);
QRgb px;
QVERIFY(!img.isNull());
-
px = img.pixel(0, 0);
QVERIFY(qRed(px) > 250 && qGreen(px) < 5 && qBlue(px) < 5);
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 09129f0676..0b22dc7893 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -2045,7 +2045,13 @@ void tst_QComboBox::mouseWheel_data()
QTest::newRow("upper locked") << disabled << start << wheel << expected;
wheel = -1;
+#ifdef Q_OS_DARWIN
+ // on OS X & iOS mouse wheel shall have no effect on combo box
+ expected = start;
+#else
+ // on other OSes we should jump to next enabled item (no. 5)
expected = 5;
+#endif
QTest::newRow("jump over") << disabled << start << wheel << expected;
disabled.clear();