summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-12 01:32:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-12 01:32:51 (GMT)
commit234150dd74cb26eb3257111f041dcb1af49b8483 (patch)
tree70e3fa857129c47dd974f201e48cedab0bb94be3 /src/corelib/io/qdir.cpp
parentc633ce4346fa04584e5168b77924ca6a42601435 (diff)
parent0601f9f764c55390a2cdd71d91c3ea25c57f2a6d (diff)
downloadQt-234150dd74cb26eb3257111f041dcb1af49b8483.zip
Qt-234150dd74cb26eb3257111f041dcb1af49b8483.tar.gz
Qt-234150dd74cb26eb3257111f041dcb1af49b8483.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (21 commits) Fix bug in QDirPrivate::setPath, affecting QDir::cd, cdUp and setPath Wrong cursor shown by the parent window after setOverrideCursor(). Fixed Mac OS X compile time error by using GLint for temp. qdoc3: Added curly braces in switch statement for braindead compiler. qdoc: Added a build rule for the documentation - disabled by default. Doc: Added the qdoc manual to the repository for future maintenance. qdoc3: Fixed bug in creation of qt.pageindex. qdoc3: Added capability to create qt.pageindex. Incorrect property setter generated by dumpcpp for Microsoft Word 2007. Cocoa: Implement our own NSApplication subclass Cocoa: Menu in menubar stays highlighted qdoc: Made a temporary fix for comment highlighting. Doc: Tidied up the class layout and removed an unnecessary image. Doc/qdoc: Use Chinese titles; canonicalize titles with non-ASCII chars. Doc/qdoc: Converted encoding of ISO-8859-1 docs to UTF-8. Output UTF-8. qdoc: Removed debugging code. Doc: Updated the configuration file for the Simplified Chinese docs. qdoc: Standardized encoding names and updated the Chinese config files. Doc: Added Simplified Chinese documents and build rules for them. qdoc: Added support for different source and output character encodings. ...
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp18
1 files changed, 6 insertions, 12 deletions
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);