summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfilesystemmodel
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-09-30 11:58:31 +0200
committerAlexis Menard <alexis.menard@nokia.com>2009-09-30 11:59:52 +0200
commit45d5832a504516219167f0205901c56035118944 (patch)
tree684e627eaf30778a1ffed89bd232e534c068f039 /tests/auto/qfilesystemmodel
parentb0aca8ecf7ff70c83ade9009fb0e7c0c8137abf7 (diff)
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
Diffstat (limited to 'tests/auto/qfilesystemmodel')
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 63bc90cadf..ea9304d04b 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());