diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2022-05-02 15:52:11 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-05-05 21:18:21 +0000 |
commit | 3fb4f667e01b3e898e662f8ad9330a0356ab99a2 (patch) | |
tree | dee324bee7f786b541d3423110e09af8c5ed05a6 /tests/auto/quick/qquickshape | |
parent | d02ec71ea750ed08c250abad4e34e1e16f5fe767 (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.
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>
(cherry picked from commit 8c217e4e20708ba5608cc8bfce9d8a358fbc122b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick/qquickshape')
-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 d72a3d265e..905bec1c64 100644 --- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp +++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp @@ -289,7 +289,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; @@ -313,7 +313,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; @@ -337,7 +337,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; @@ -361,7 +361,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; @@ -385,7 +385,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; @@ -414,7 +414,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; @@ -480,7 +480,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; @@ -631,7 +631,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; @@ -679,7 +679,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; |