~ubuntu-branches/debian/sid/kde-baseapps/sid

« back to all changes in this revision

Viewing changes to dolphin/src/tests/testdir.cpp

  • Committer: Package Import Robot
  • Author(s): Modestas Vainius, Eshat Cakar, Pino Toscano
  • Date: 2012-06-09 22:18:08 UTC
  • mfrom: (4.2.1) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20120609221808-h1l0ekd5qmb8nefr
Tags: 4:4.8.4-1
* New upstream release.

[ Eshat Cakar ]
* Add watch file.
* Bump kde-sc-dev-latest build dependency to version 4:4.8.4.
* Update installed files.

[ Pino Toscano ]
* Move files of the konqueror documentation from kde-baseapps-data to
  konqueror itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <sys/utime.h>
28
28
#endif
29
29
 
 
30
TestDir::TestDir()
 
31
{
 
32
}
 
33
 
 
34
TestDir::~TestDir()
 
35
{
 
36
}
 
37
 
 
38
KUrl TestDir::url() const
 
39
{
 
40
    return KUrl(name());
 
41
}
 
42
 
30
43
/** The following function is taken from kdelibs/kio/tests/kiotesthelper.h, copyright (C) 2006 by David Faure */
31
 
 
32
44
static void setTimeStamp(const QString& path, const QDateTime& mtime)
33
45
{
34
46
#ifdef Q_OS_UNIX
63
75
 
64
76
void TestDir::createFiles(const QStringList& files)
65
77
{
66
 
    foreach(const QString& path, files) {
 
78
    foreach (const QString& path, files) {
67
79
        createFile(path);
68
80
    }
69
81
}
81
93
    Q_ASSERT(QFile::exists(absolutePath));
82
94
}
83
95
 
 
96
void TestDir::removeFile(const QString& path)
 
97
{
 
98
    QString absolutePath = path;
 
99
    QFileInfo fileInfo(absolutePath);
 
100
    if (!fileInfo.isAbsolute()) {
 
101
        absolutePath = name() + path;
 
102
    }
 
103
    QFile::remove(absolutePath);
 
104
}
 
105
 
84
106
void TestDir::makePathAbsoluteAndCreateParents(QString& path)
85
107
{
86
108
    QFileInfo fileInfo(path);