From 80f69e2d2501c9958068c305ccd909aa034334d9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 19 Apr 2010 14:09:31 +0200 Subject: [tst_qdiriterator] Stop removing files from the repository. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes issue introduced by 21e0423a5c9ecd9da8e141dcfba25e60b55f7fe5. Reviewed-By: João Abecasis --- tests/auto/qdiriterator/tst_qdiriterator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp index c1db8f2..1a873b8 100644 --- a/tests/auto/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp @@ -85,11 +85,13 @@ private: // convenience functions return false; } - bool createFile(const QString &fileName) + enum Cleanup { DoDelete, DontDelete }; + bool createFile(const QString &fileName, Cleanup cleanup = DoDelete) { QFile file(fileName); if (file.open(QIODevice::WriteOnly)) { - createdFiles << fileName; + if (cleanup == DoDelete) + createdFiles << fileName; return true; } return false; @@ -131,9 +133,9 @@ tst_QDirIterator::tst_QDirIterator() createDirectory("entrylist"); createDirectory("entrylist/directory"); - createFile("entrylist/file"); + createFile("entrylist/file", DontDelete); createFile("entrylist/writable"); - createFile("entrylist/directory/dummy"); + createFile("entrylist/directory/dummy", DontDelete); createDirectory("recursiveDirs"); createDirectory("recursiveDirs/dir1"); -- cgit v0.12