From 45d5832a504516219167f0205901c56035118944 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 30 Sep 2009 11:58:31 +0200 Subject: Make the test more robust because pulse doesn't clean the temp dir. I clean the directory i will use to be sure it is clean. Reviewed-by:TrustMe --- tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp index 63bc90c..ea9304d 100644 --- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -806,6 +806,16 @@ void tst_QFileSystemModel::sort() QDir dir(QDir::tempPath()); dir.mkdir("sortTemp"); dir.cd("sortTemp"); + QDirIterator it(dir); + while(it.hasNext()) + { + it.next(); + QFileInfo info = it.fileInfo(); + if (info.isDir()) + dir.rmdir(info.fileName()); + else + QFile::remove(info.absoluteFilePath()); + } const QString dirPath = dir.absolutePath(); QVERIFY(dir.exists()); -- cgit v0.12