X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2f62b054eabffb657976f94abd49c6445878b647..a17a13c4dfe361b4e043b77278a5fe4f7358092b:/src/tests/testdir.cpp diff --git a/src/tests/testdir.cpp b/src/tests/testdir.cpp index 5d75a5343..6fbc4c426 100644 --- a/src/tests/testdir.cpp +++ b/src/tests/testdir.cpp @@ -96,6 +96,17 @@ void TestDir::removeFile(const QString& path) QFile::remove(absolutePath); } +void TestDir::removeDir(const QString& path) +{ + QString absolutePath = path; + QFileInfo fileInfo(absolutePath); + if (!fileInfo.isAbsolute()) { + absolutePath = TestDir::path() + QLatin1Char('/') + path; + } + QDir dirToRemove = QDir(absolutePath); + dirToRemove.removeRecursively(); +} + void TestDir::makePathAbsoluteAndCreateParents(QString& path) { QFileInfo fileInfo(path);