From 61904b8cfc68f3668ec9beed6e0746cf16d1a5f6 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 29 May 2012 09:54:13 +1000 Subject: [PATCH] Make tst_qfilesystemmodel parallel-safe. Changed one testfunction to use the test's own QTemporaryDir instead of the system-wide temporary directory. Change-Id: I6740a7f4ba7f53174cd0730239d8dc088e5111ba Reviewed-by: Toby Tomkins --- .../auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro | 1 + .../widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro index 166306757c..076025e325 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro @@ -1,4 +1,5 @@ CONFIG += testcase +CONFIG += parallel_test QT += widgets widgets-private QT += core-private gui testlib diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 47c40032c3..af213a5508 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -889,7 +889,7 @@ void tst_QFileSystemModel::sort() void tst_QFileSystemModel::mkdir() { - QString tmp = QDir::tempPath(); + QString tmp = flatDirTestPath; QString newFolderPath = QDir::toNativeSeparators(tmp + '/' + "NewFoldermkdirtest4"); QModelIndex tmpDir = model->index(tmp); QVERIFY(tmpDir.isValid());