diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-01-29 12:12:43 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-29 12:12:43 (GMT) |
commit | 5d8e2a668d497e81c812328f045d73c7f24efc70 (patch) | |
tree | 3d1899c927fa1b2f5f30d043d0718319217d96b9 /src/corelib/io/qdir.cpp | |
parent | 585ac6cf9da5896753d33090320ebcc9c97cdda5 (diff) | |
download | Qt-5d8e2a668d497e81c812328f045d73c7f24efc70.zip Qt-5d8e2a668d497e81c812328f045d73c7f24efc70.tar.gz Qt-5d8e2a668d497e81c812328f045d73c7f24efc70.tar.bz2 |
QDirPrivate: remove unused q_ptr and Q_DECLARE_PUBLIC
update constructor signatures; both private and protected members became
public.
Merge-request: 445
Reviewed-by: João Abecasis <joao@trolltech.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r-- | src/corelib/io/qdir.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 61f048a..d7fb03b 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -83,12 +83,10 @@ static QString driveSpec(const QString &path) //************* QDirPrivate class QDirPrivate { - QDir *q_ptr; - Q_DECLARE_PUBLIC(QDir) - friend struct QScopedPointerDeleter<QDirPrivate>; -protected: - QDirPrivate(QDir*, const QDir *copy=0); + +public: + QDirPrivate(const QDir *copy = 0); ~QDirPrivate(); QString initFileEngine(const QString &file); @@ -96,7 +94,6 @@ protected: void updateFileLists() const; void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *) const; -private: #ifdef QT3_SUPPORT QChar filterSepChar; bool matchAllDirs; @@ -168,10 +165,9 @@ private: void detach(bool createFileEngine = true); }; -QDirPrivate::QDirPrivate(QDir *qq, const QDir *copy) : q_ptr(qq) +QDirPrivate::QDirPrivate(const QDir *copy) #ifdef QT3_SUPPORT - , filterSepChar(0) - , matchAllDirs(false) + : filterSepChar(0), matchAllDirs(false) #endif { if(copy) { @@ -187,7 +183,6 @@ QDirPrivate::~QDirPrivate() if (!data->ref.deref()) delete data; data = 0; - q_ptr = 0; } /* For sorting */ @@ -514,7 +509,7 @@ void QDirPrivate::detach(bool createFileEngine) \sa currentPath() */ -QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this)) +QDir::QDir(const QString &path) : d_ptr(new QDirPrivate) { Q_D(QDir); d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path); @@ -543,7 +538,7 @@ QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this)) */ QDir::QDir(const QString &path, const QString &nameFilter, - SortFlags sort, Filters filters) : d_ptr(new QDirPrivate(this)) + SortFlags sort, Filters filters) : d_ptr(new QDirPrivate) { Q_D(QDir); d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path); @@ -571,7 +566,7 @@ QDir::QDir(const QString &path, const QString &nameFilter, \sa operator=() */ -QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(this, &dir)) +QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(&dir)) { } |