┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/testdir.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-08-26 08:08:11 +0200
committerPeter Penz <[email protected]>2011-08-26 08:09:50 +0200
commit26648a0264ad726682901b2f9c9b5bd92dedb782 (patch)
tree085614d7562d8cdb90f5976392727f1dd756fb5f /src/tests/testdir.cpp
parenta14d8bf655917dcf806e22bdfafb03a35f5c8680 (diff)
Fix issue that removing an item is not recognized
Thanks to Tirtha Chatterjee for the patch! REVIEW: 102435
Diffstat (limited to 'src/tests/testdir.cpp')
-rw-r--r--src/tests/testdir.cpp10
1 files changed, 10 insertions, 0 deletions
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);