X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2b895e7e2bd096e55faa1032ebc6a355a72c2325..8e4ffa545f6a9d50af4cc93d39c9914cf4818822:/src/tests/testdir.h diff --git a/src/tests/testdir.h b/src/tests/testdir.h index 3f244448c..10d7614c2 100644 --- a/src/tests/testdir.h +++ b/src/tests/testdir.h @@ -1,28 +1,15 @@ -/***************************************************************************** - * Copyright (C) 2010-2011 by Frank Reininghaus (frank78ac@googlemail.com) * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - *****************************************************************************/ +/* + * SPDX-FileCopyrightText: 2010-2011 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TESTDIR_H #define TESTDIR_H -#include -#include #include +#include +#include /** * TestDir provides a temporary directory. In addition to QTemporaryDir, it has @@ -30,9 +17,8 @@ */ class TestDir : public QTemporaryDir { - public: - TestDir(const QString& directoryPrefix = QString()); + TestDir(const QString &directoryPrefix = QString()); virtual ~TestDir(); QUrl url() const; @@ -42,18 +28,16 @@ public: * The paths may be absolute or relative to the test directory. Any missing parent * directories will be created automatically. */ - void createFile(const QString& path, - const QByteArray& data = QByteArray("test"), - const QDateTime& time = QDateTime()); - void createFiles(const QStringList& files); - void createDir(const QString& path, const QDateTime& time = QDateTime()); + void createFile(const QString &path, const QByteArray &data = QByteArray("test"), const QDateTime &time = QDateTime()); + void createFiles(const QStringList &files); + void createDir(const QString &path, const QDateTime &time = QDateTime()); - void removeFile(const QString& path); - void removeFiles(const QStringList& files); + void removeFile(const QString &path); + void removeFiles(const QStringList &files); + void removeDir(const QString &path); private: - void makePathAbsoluteAndCreateParents(QString& path); - + void makePathAbsoluteAndCreateParents(QString &path); }; #endif