]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/testdir.h
Don't allow opening the terminal if shell_access Kiosk mode is set
[dolphin.git] / src / tests / testdir.h
index bcaa034b58604855456172430e7278822aa44f4e..3f244448c165d21c7a1aa18a78177b363d02fa74 100644 (file)
 #ifndef TESTDIR_H
 #define TESTDIR_H
 
-#include <KTempDir>
-#include <KUrl>
-
+#include <QUrl>
+#include <QTemporaryDir>
 #include <QDateTime>
 
 /**
- * TestDir provides a temporary directory. In addition to KTempDir, it has
+ * TestDir provides a temporary directory. In addition to QTemporaryDir, it has
  * methods that create files and subdirectories inside the directory.
  */
-class TestDir : public KTempDir
+class TestDir : public QTemporaryDir
 {
 
 public:
-    TestDir();
+    TestDir(const QString& directoryPrefix = QString());
     virtual ~TestDir();
 
-    KUrl url() const;
+    QUrl url() const;
 
     /**
      * The following functions create either a file, a list of files, or a directory.
@@ -49,6 +48,9 @@ public:
     void createFiles(const QStringList& files);
     void createDir(const QString& path, const QDateTime& time = QDateTime());
 
+    void removeFile(const QString& path);
+    void removeFiles(const QStringList& files);
+
 private:
     void makePathAbsoluteAndCreateParents(QString& path);