Fix output location for generated files

Not all tests have been updated to consider sandboxed targets causing
open/write errors.

Change-Id: Id7bb925c0faf04bf88cb126fb7c2846c38f36290
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Maurice Kalinowski 2016-09-01 13:55:55 +02:00
parent bb7e3e2dd7
commit 443240b512

View File

@ -239,7 +239,7 @@ void tst_QImageWriter::writeImage2_data()
foreach (const QString format, formats) { foreach (const QString format, formats) {
const QString fileName = QLatin1String("solidcolor_") const QString fileName = QLatin1String("solidcolor_")
+ QString::number(imgFormat) + QLatin1Char('.') + format; + QString::number(imgFormat) + QLatin1Char('.') + format;
QTest::newRow(fileName.toLatin1()) << fileName QTest::newRow(fileName.toLatin1()) << writePrefix + fileName
<< format.toLatin1() << format.toLatin1()
<< image; << image;
} }
@ -510,7 +510,7 @@ void tst_QImageWriter::saveToTemporaryFile()
} }
{ {
// 3) Via QImageWriter's API, with a named temp file // 3) Via QImageWriter's API, with a named temp file
QTemporaryFile file("tempXXXXXX"); QTemporaryFile file(writePrefix + QLatin1String("tempXXXXXX"));
QVERIFY2(file.open(), qPrintable(file.errorString())); QVERIFY2(file.open(), qPrintable(file.errorString()));
QImageWriter writer(&file, "PNG"); QImageWriter writer(&file, "PNG");
QVERIFY(writer.write(image)); QVERIFY(writer.write(image));
@ -518,7 +518,7 @@ void tst_QImageWriter::saveToTemporaryFile()
} }
{ {
// 4) Via QImage's API, with a named temp file // 4) Via QImage's API, with a named temp file
QTemporaryFile file("tempXXXXXX"); QTemporaryFile file(writePrefix + QLatin1String("tempXXXXXX"));
QVERIFY2(file.open(), qPrintable(file.errorString())); QVERIFY2(file.open(), qPrintable(file.errorString()));
QVERIFY(image.save(&file, "PNG")); QVERIFY(image.save(&file, "PNG"));
file.reset(); file.reset();