diff options
-rw-r--r-- | dist/changes-5.0.0 | 3 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 1 | ||||
-rw-r--r-- | src/corelib/io/qdir.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 3874f88032..14a9cbb084 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -190,6 +190,9 @@ information about a particular change. - QTextCodecPlugin has been removed since it is no longer used. All text codecs are now built into QtCore. +- QDir::NoDotAndDotDot is QDir::NoDot|QDir::NoDotDot therefore there is no need + to use or check both. + **************************************************************************** * General * **************************************************************************** diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index e09c133961..afd6620e65 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -2217,7 +2217,6 @@ QDebug operator<<(QDebug debug, QDir::Filters filters) if (filters & QDir::Files) flags << QLatin1String("Files"); if (filters & QDir::Drives) flags << QLatin1String("Drives"); if (filters & QDir::NoSymLinks) flags << QLatin1String("NoSymLinks"); - if (filters & QDir::NoDotAndDotDot) flags << QLatin1String("NoDotAndDotDot"); // ### Qt5: remove (because NoDotAndDotDot=NoDot|NoDotDot) if (filters & QDir::NoDot) flags << QLatin1String("NoDot"); if (filters & QDir::NoDotDot) flags << QLatin1String("NoDotDot"); if ((filters & QDir::AllEntries) == QDir::AllEntries) flags << QLatin1String("AllEntries"); diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index bc7837a7c1..5551ecd2fb 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -77,9 +77,9 @@ public: AllDirs = 0x400, CaseSensitive = 0x800, - NoDotAndDotDot = 0x1000, // ### Qt5 NoDotAndDotDot = NoDot|NoDotDot NoDot = 0x2000, NoDotDot = 0x4000, + NoDotAndDotDot = NoDot | NoDotDot, NoFilter = -1 }; diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index cd80e1adf6..c5f24071aa 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -330,8 +330,6 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf return false; if ((filters & QDir::NoDotDot) && dotOrDotDot && fileNameSize == 2) return false; - if ((filters & QDir::NoDotAndDotDot) && dotOrDotDot) // ### Qt5 remove (NoDotAndDotDot == NoDot|NoDotDot) - return false; // name filter #ifndef QT_NO_REGEXP diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index ed7754da6f..3d26594a00 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1964,8 +1964,8 @@ bool QFileSystemModelPrivate::filtersAcceptsNode(const QFileSystemNode *node) co const bool hideHidden = !(filters & QDir::Hidden); const bool hideSystem = !(filters & QDir::System); const bool hideSymlinks = (filters & QDir::NoSymLinks); - const bool hideDot = (filters & QDir::NoDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot) - const bool hideDotDot = (filters & QDir::NoDotDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot) + const bool hideDot = (filters & QDir::NoDot); + const bool hideDotDot = (filters & QDir::NoDotDot); // Note that we match the behavior of entryList and not QFileInfo on this and this // incompatibility won't be fixed until Qt 5 at least |