From 72e9aee500cbd1363edf8a517b007ebb8ac6e88a Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 24 May 2017 12:53:17 +0200 Subject: [PATCH] winrt: Fix tst_QPainterPath We have to use a temporary data path for winrt, as the applications are sandboxed and cannot just put data anywhere. Change-Id: I8f95de132e5b5ac77441cbbf26af873b8018c7cb Reviewed-by: Friedemann Kleint --- tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 757e4d16e4..16215714f3 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -699,9 +699,11 @@ void tst_QPainterPath::testOperatorDatastream() path.addRect(0, 0, 100, 100); path.setFillRule(Qt::WindingFill); + QTemporaryDir tempDir(QDir::tempPath() + "/tst_qpainterpath.XXXXXX"); + QVERIFY2(tempDir.isValid(), qPrintable(tempDir.errorString())); // Write out { - QFile data("data"); + QFile data(tempDir.path() + "/data"); bool ok = data.open(QFile::WriteOnly); QVERIFY(ok); QDataStream stream(&data); @@ -711,7 +713,7 @@ void tst_QPainterPath::testOperatorDatastream() QPainterPath other; // Read in { - QFile data("data"); + QFile data(tempDir.path() + "/data"); bool ok = data.open(QFile::ReadOnly); QVERIFY(ok); QDataStream stream(&data);