summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-09-30 09:58:31 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-09-30 09:59:52 (GMT)
commit45d5832a504516219167f0205901c56035118944 (patch)
tree684e627eaf30778a1ffed89bd232e534c068f039 /tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
parentb0aca8ecf7ff70c83ade9009fb0e7c0c8137abf7 (diff)
downloadQt-45d5832a504516219167f0205901c56035118944.zip
Qt-45d5832a504516219167f0205901c56035118944.tar.gz
Qt-45d5832a504516219167f0205901c56035118944.tar.bz2
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/tst_qfilesystemmodel.cpp')
-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 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());