aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2017-01-13 12:45:08 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-01-31 05:54:01 +0000
commitf42f1366dcd4b070c69c9e7fe42a704ef23da14d (patch)
treeb093544db389efdc344e543b565b7d2f7f281fb5 /tests/auto/quick
parente6d4df156e9aec62054740dc99ab8ba2855eaafc (diff)
Use the image handler to return a scaled size for the SVG
When the SVG was made to be drawn at a small width and a large height then it would lead to blurring in the rendering of the SVG. By having the image handler deal with returning the image we want for the scaled size it will ensure this is rendered correctly since it is able to account for the ratio already inside the SVG image handler. Task-number: QTBUG-65789 Change-Id: Ib8627c0537679aab022e88a0eea73a21d8cbc564 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index a2a65aa803..f6720f96e3 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -400,11 +400,11 @@ void tst_qquickimage::svg()
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QQuickImage *obj = qobject_cast<QQuickImage*>(component.create());
QVERIFY(obj != 0);
- QCOMPARE(int(obj->width()), 212); // round down: highdpi can give back fractional values
+ QCOMPARE(obj->width(), 300.0);
QCOMPARE(obj->height(), 300.0);
obj->setSourceSize(QSize(200,200));
- QCOMPARE(int(obj->width()), 141); // round down: highdpi can give back fractional values
+ QCOMPARE(obj->width(), 200.0);
QCOMPARE(obj->height(), 200.0);
delete obj;
}