diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2022-05-02 15:52:11 +0200 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2022-05-03 10:06:26 +0200 |
commit | 8c217e4e20708ba5608cc8bfce9d8a358fbc122b (patch) | |
tree | 627e275aad57762e5c913cfdba4c81d1d93dbec7 | |
parent | c82b565c1041775ac5f88912f92f516ad0598b44 (diff) |
Fix test file inclusion in tst_qquickshape
Test file paths were generated using testFileUrl("foo").toLocalFile().
This does not work on Android. This patch fixes it.
Pick-to: 6.2 6.3
Task-number: QTBUG-103094
Task-number: QTBUG-101865
Change-Id: I24c8f0f1965b652fe66b5902368d54241bfec565
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r-- | tests/auto/quick/qquickshape/tst_qquickshape.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp index 0d2debcf1f..c523811714 100644 --- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp +++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp @@ -288,7 +288,7 @@ void tst_QQuickShape::render() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem3.png").toLocalFile()); + QImage refImg(testFile("pathitem3.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -311,7 +311,7 @@ void tst_QQuickShape::renderWithMultipleSp() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem4.png").toLocalFile()); + QImage refImg(testFile("pathitem4.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -334,7 +334,7 @@ void tst_QQuickShape::radialGrad() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem5.png").toLocalFile()); + QImage refImg(testFile("pathitem5.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -357,7 +357,7 @@ void tst_QQuickShape::conicalGrad() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem6.png").toLocalFile()); + QImage refImg(testFile("pathitem6.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -380,7 +380,7 @@ void tst_QQuickShape::renderPolyline() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem3.png").toLocalFile()); // It's a recreation of pathitem3 using PathPolyline + QImage refImg(testFile("pathitem3.png")); // It's a recreation of pathitem3 using PathPolyline QVERIFY(!refImg.isNull()); QString errorMessage; @@ -408,7 +408,7 @@ void tst_QQuickShape::renderMultiline() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("pathitem8.png").toLocalFile()); + QImage refImg(testFile("pathitem8.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -473,7 +473,7 @@ void tst_QQuickShape::polylineDataTypes() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("polyline.png").toLocalFile()); + QImage refImg(testFile("polyline.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -623,7 +623,7 @@ void tst_QQuickShape::multilineDataTypes() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("multiline.png").toLocalFile()); + QImage refImg(testFile("multiline.png")); QVERIFY(!refImg.isNull()); QString errorMessage; @@ -670,7 +670,7 @@ void tst_QQuickShape::multilineStronglyTyped() QImage img = window->grabWindow(); QVERIFY(!img.isNull()); - QImage refImg(testFileUrl("multiline.png").toLocalFile()); + QImage refImg(testFile("multiline.png")); QVERIFY(!refImg.isNull()); QString errorMessage; |