From 7ffce3fb0bb0bd42aa359467d66691ef8a4762df Mon Sep 17 00:00:00 2001 From: Bartosz Brachaczek Date: Sun, 29 Dec 2013 04:01:27 +0100 Subject: 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 Reviewed-by: Thiago Macieira --- src/corelib/io/qdir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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. -- cgit v1.2.3