summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-19 10:48:45 (GMT)
committeraxis <qt-info@nokia.com>2010-02-19 10:48:45 (GMT)
commit1c48ec8f4876db0b4c7b86dd19ab8bb27c082786 (patch)
tree8ca2723a27ae670b3e84dfb21b6a3a28d3bbe401 /src/corelib/io
parent0374c15075f98b0b4efbb1c00ef3812b67fabe0f (diff)
parentade4d096fc2ea145a3d9586e3ab2a9af9c5a9a72 (diff)
downloadQt-1c48ec8f4876db0b4c7b86dd19ab8bb27c082786.zip
Qt-1c48ec8f4876db0b4c7b86dd19ab8bb27c082786.tar.gz
Qt-1c48ec8f4876db0b4c7b86dd19ab8bb27c082786.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public into merge-with-qt-master
Conflicts: qmake/generators/symbian/symmake.cpp
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdataurl.cpp2
-rw-r--r--src/corelib/io/qdataurl_p.h2
-rw-r--r--src/corelib/io/qdir.cpp18
3 files changed, 8 insertions, 14 deletions
diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp
index 9bb896e..4e2dec2 100644
--- a/src/corelib/io/qdataurl.cpp
+++ b/src/corelib/io/qdataurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdataurl_p.h b/src/corelib/io/qdataurl_p.h
index be5b10d..57cfd75 100644
--- a/src/corelib/io/qdataurl_p.h
+++ b/src/corelib/io/qdataurl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index f5d803e..7cfdddf 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -89,8 +89,6 @@ public:
QDirPrivate(const QDir *copy = 0);
~QDirPrivate();
- QString initFileEngine(const QString &file);
-
void updateFileLists() const;
void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *) const;
@@ -146,6 +144,7 @@ public:
} *data;
inline void setPath(const QString &p)
{
+ detach(false);
QString path = p;
if ((path.endsWith(QLatin1Char('/')) || path.endsWith(QLatin1Char('\\')))
&& path.length() > 1) {
@@ -155,8 +154,12 @@ public:
path.truncate(path.length() - 1);
}
+ delete data->fileEngine;
+ data->fileEngine = QAbstractFileEngine::create(path);
+
// set the path to be the qt friendly version so then we can operate on it using just /
- data->path = initFileEngine(path);
+ data->path = data->fileEngine->fileName(QAbstractFileEngine::DefaultName);
+ data->clear();
}
inline void reset() {
detach();
@@ -310,15 +313,6 @@ inline void QDirPrivate::updateFileLists() const
}
}
-inline QString QDirPrivate::initFileEngine(const QString &path)
-{
- detach(false);
- data->clear();
- delete data->fileEngine;
- data->fileEngine = QAbstractFileEngine::create(path);
- return data->fileEngine->fileName(QAbstractFileEngine::DefaultName);
-}
-
void QDirPrivate::detach(bool createFileEngine)
{
qAtomicDetach(data);