diff options
author | Bernhard Rosenkraenzer <br@blankpage.ch> | 2010-03-23 15:27:42 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-03-23 15:27:42 (GMT) |
commit | c6ef7c0cbd2ad7ac486cd6bcabaac4d090df0c03 (patch) | |
tree | a01625662210a0d2ce629463bb52be5e164d9852 /src/corelib/io/qdir.cpp | |
parent | b4996ab8e3a26d45ee55593da281e4b798c04dd2 (diff) | |
download | Qt-c6ef7c0cbd2ad7ac486cd6bcabaac4d090df0c03.zip Qt-c6ef7c0cbd2ad7ac486cd6bcabaac4d090df0c03.tar.gz Qt-c6ef7c0cbd2ad7ac486cd6bcabaac4d090df0c03.tar.bz2 |
Split QDir::NoDotAndDotDot into QDir::NoDot and QDir::NoDotDot
This creates QDir::NoDot and QDir::NoDotDot filters -- in many cases,
one may want the .. entry (e.g. to navigate to the parent directory)
but not the . entry (useless for navigation).
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r-- | src/corelib/io/qdir.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 505889e..1b60936 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1079,6 +1079,8 @@ QDir::Filters QDir::filter() const \value NoSymLinks Do not list symbolic links (ignored by operating systems that don't support symbolic links). \value NoDotAndDotDot Do not list the special entries "." and "..". + \value NoDot Do not list the special entry ".". + \value NoDotDot Do not list the special entry "..". \value AllEntries List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). \value Readable List files for which the application has read @@ -2367,7 +2369,9 @@ 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"); + 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"); if (filters & QDir::Readable) flags << QLatin1String("Readable"); if (filters & QDir::Writable) flags << QLatin1String("Writable"); |