summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2013-09-10 23:04:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-16 12:12:09 +0200
commitaabbd27dda898cfb87998b81c28512c2f8907847 (patch)
tree215fab426a51953bdaaa253b6b1d8cf507851b07 /tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
parent104debb6627d71f5540bb2c3347ce56dddc63594 (diff)
Simplify QFileSystemModel::remove by using QDir::removeRecursively
This also fixes it in case of hidden or system files, which were missing from the filter (found by Denis Kovalskiy). Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 0fe7c8ab75..0b9fb5c168 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -921,10 +921,8 @@ void tst_QFileSystemModel::mkdir()
int oldRow = idx.row();
QTest::qWait(WAITTIME);
idx = model->index(newFolderPath);
- QDir cleanup(tmp);
- QVERIFY(cleanup.rmdir(QLatin1String("NewFoldermkdirtest3")));
- QVERIFY(cleanup.rmdir(QLatin1String("NewFoldermkdirtest5")));
- bestatic.rmdir(newFolderPath);
+ QVERIFY(model->remove(idx));
+ QVERIFY(!bestatic.exists());
QVERIFY(0 != idx.row());
QCOMPARE(oldRow, idx.row());
}