summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfilesystemmodel
diff options
context:
space:
mode:
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());