diff options
author | Bartosz Brachaczek <b.brachaczek@gmail.com> | 2013-12-29 04:01:27 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 12:20:45 +0100 |
commit | 7ffce3fb0bb0bd42aa359467d66691ef8a4762df (patch) | |
tree | 8313d0e09f0ebd617def0c45b47a2466a9b4b5fc /src/corelib/io/qdir.cpp | |
parent | 446f9f2812e9f351caca11750792dadbd4e53662 (diff) |
Fix cd(), cdUp() QDir member functions docs regarding nonreadable dirs
The documentation implies that cd() and cdUp() functions return false if
the new directory is not readable, but that is not the case. It is an
obvious mistake in the documentation, because cd'ing into a nonreadable
directory is perfectly valid.
Provided also with a test to verify that cd() actually returns true with
nonreadable directories.
Change-Id: I4aa3e859b35c64266df510a203574e3701aea77c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r-- | src/corelib/io/qdir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 43db2ec1fe..015f4cfe14 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -855,7 +855,7 @@ QString QDir::fromNativeSeparators(const QString &pathName) /*! Changes the QDir's directory to \a dirName. - Returns \c true if the new directory exists and is readable; + Returns \c true if the new directory exists; otherwise returns \c false. Note that the logical cd() operation is not performed if the new directory does not exist. @@ -923,7 +923,7 @@ bool QDir::cd(const QString &dirName) Changes directory by moving one directory up from the QDir's current directory. - Returns \c true if the new directory exists and is readable; + Returns \c true if the new directory exists; otherwise returns \c false. Note that the logical cdUp() operation is not performed if the new directory does not exist. |