From 26648a0264ad726682901b2f9c9b5bd92dedb782 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 26 Aug 2011 08:08:11 +0200 Subject: Fix issue that removing an item is not recognized Thanks to Tirtha Chatterjee for the patch! REVIEW: 102435 --- src/tests/testdir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tests/testdir.cpp') diff --git a/src/tests/testdir.cpp b/src/tests/testdir.cpp index 5e961d2ab..a7f3cd4dc 100644 --- a/src/tests/testdir.cpp +++ b/src/tests/testdir.cpp @@ -93,6 +93,16 @@ void TestDir::createDir(const QString& path, const QDateTime& time) Q_ASSERT(QFile::exists(absolutePath)); } +void TestDir::removeFile(const QString& path) +{ + QString absolutePath = path; + QFileInfo fileInfo(absolutePath); + if (!fileInfo.isAbsolute()) { + absolutePath = name() + path; + } + QFile::remove(absolutePath); +} + void TestDir::makePathAbsoluteAndCreateParents(QString& path) { QFileInfo fileInfo(path); -- cgit v1.3