Default image scaling behaviour has changed; fix autotest.
authorToby Tomkins <toby.tomkins@nokia.com>
Tue, 13 Mar 2012 01:17:54 +0000 (11:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Mar 2012 05:53:11 +0000 (06:53 +0100)
The default image scaling behaviour has changed in qtdeclarative. This
change fixes the autotest to conform to fixed ratio scaling.

Change-Id: I9c901825295fb04cab74c46f61696c5274ddd943
Reviewed-by: Martin Jones <martin.jones@nokia.com>
tests/auto/quick/qquickimage/tst_qquickimage.cpp

index eda56fa..be815d8 100644 (file)
@@ -369,11 +369,11 @@ void tst_qquickimage::svg()
     QQuickImage *obj = qobject_cast<QQuickImage*>(component.create());
     QVERIFY(obj != 0);
     QCOMPARE(obj->width(), 300.0);
-    QCOMPARE(obj->height(), 300.0);
+    QCOMPARE(obj->height(), 273.0);
     obj->setSourceSize(QSize(200,200));
 
     QCOMPARE(obj->width(), 200.0);
-    QCOMPARE(obj->height(), 200.0);
+    QCOMPARE(obj->height(), 182.0);
     delete obj;
 }