summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qdir.cpp17
-rw-r--r--src/corelib/io/qfileinfo.cpp17
2 files changed, 27 insertions, 7 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 9dd0f4ac1d..5158029c6e 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -409,6 +409,9 @@ inline void QDirPrivate::initFileEngine()
a QDir is using a relative or an absolute file path. Call
makeAbsolute() to convert a relative QDir to an absolute one.
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
+
\section1 Navigation and Directory Operations
A directory's path can be obtained with the path() function, and
@@ -1690,6 +1693,9 @@ bool QDir::isRoot() const
Returns \c true if the directory's path is absolute; otherwise
returns \c false. See isAbsolutePath().
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
+
\sa isRelative(), makeAbsolute(), cleanPath()
*/
@@ -1699,9 +1705,8 @@ bool QDir::isRoot() const
Returns \c true if \a path is absolute; returns \c false if it is
relative.
- \note If \a path starts with ':', this function will return \c true
- because paths starting with ':' are treated specially as they denote
- a QResource.
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
\sa isAbsolute(), isRelativePath(), makeAbsolute(), cleanPath(), QResource
*/
@@ -1711,6 +1716,9 @@ bool QDir::isRoot() const
false. (Under Unix a path is relative if it does not start with a
"/").
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
+
\sa makeAbsolute(), isAbsolute(), isAbsolutePath(), cleanPath()
*/
bool QDir::isRelative() const
@@ -2349,6 +2357,9 @@ QString QDir::cleanPath(const QString &path)
Returns \c true if \a path is relative; returns \c false if it is
absolute.
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
+
\sa isRelative(), isAbsolutePath(), makeAbsolute()
*/
bool QDir::isRelativePath(const QString &path)
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 4b81467687..955e52337f 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -241,6 +241,9 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
path. You can call the function makeAbsolute() to convert a
relative QFileInfo's path to an absolute path.
+ \note Paths starting with a colon (\e{:}) are always considered
+ absolute, as they denote a QResource.
+
The file that the QFileInfo works on is set in the constructor or
later with setFile(). Use exists() to see if the file exists and
size() to get its size.
@@ -634,17 +637,23 @@ QString QFileInfo::path() const
/*!
\fn bool QFileInfo::isAbsolute() const
- Returns \c true if the file path name is absolute, otherwise returns
- false if the path is relative.
+ Returns \c true if the file path is absolute, otherwise returns \c false (i.e.
+ the path is relative).
+
+ \note Paths starting with a colon (\e{:}) are always considered absolute, as
+ they denote a QResource.
\sa isRelative()
*/
/*!
- Returns \c true if the file path name is relative, otherwise returns
- false if the path is absolute (e.g. under Unix a path is absolute
+ Returns \c true if the file path is relative, otherwise returns \c
+ false (i.e. the path is absolute). (E.g. under Unix a path is absolute
if it begins with a "/").
+ \note Paths starting with a colon (\e{:}) are always considered absolute,
+ as they denote a QResource.
+
\sa isAbsolute()
*/
bool QFileInfo::isRelative() const