QDir::NoDotAndDotDot is now QDir::NoDot|QDir::NoDotDot.
authorJonas M. Gastal <jgastal@profusion.mobi>
Mon, 30 Jan 2012 13:09:13 +0000 (11:09 -0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 31 Jan 2012 19:01:02 +0000 (20:01 +0100)
Change-Id: I8ef7782258c2ec02ad2ec2a5d5cab90f53c62aa3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
dist/changes-5.0.0
src/corelib/io/qdir.cpp
src/corelib/io/qdir.h
src/corelib/io/qdiriterator.cpp
src/widgets/dialogs/qfilesystemmodel.cpp

index 3874f88..14a9cbb 100644 (file)
@@ -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                                        *
 ****************************************************************************
index e09c133..afd6620 100644 (file)
@@ -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");
index bc7837a..5551ecd 100644 (file)
@@ -77,9 +77,9 @@ public:
 
                   AllDirs       = 0x400,
                   CaseSensitive = 0x800,
-                  NoDotAndDotDot = 0x1000, // ### Qt5 NoDotAndDotDot = NoDot|NoDotDot
                   NoDot         = 0x2000,
                   NoDotDot      = 0x4000,
+                  NoDotAndDotDot = NoDot | NoDotDot,
 
                   NoFilter = -1
     };
index cd80e1a..c5f2407 100644 (file)
@@ -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
index ed7754d..3d26594 100644 (file)
@@ -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