diff options
Diffstat (limited to 'src/tests/testdir.cpp')
| -rw-r--r-- | src/tests/testdir.cpp | 10 |
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); |
