Fix test for targets without process support

There is no need to switch to the current directory, when there is no
process support. This also fixes running the test on sandboxed target
platforms.

Change-Id: I25fabb8b22d3510062a012884eb1eaab682901d3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Maurice Kalinowski 2016-09-22 15:01:55 +02:00
parent 31b3986e2d
commit 0be620ac58
1 changed files with 2 additions and 0 deletions

View File

@ -73,8 +73,10 @@ void tst_QClipboard::cleanupTestCase()
void tst_QClipboard::init()
{
#ifndef QT_NO_PROCESS
const QString testdataDir = QFileInfo(QFINDTESTDATA("copier")).absolutePath();
QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir));
#endif
}
Q_DECLARE_METATYPE(QClipboard::Mode)