summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2020-09-16 17:35:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-09-19 16:05:49 +0000
commit7f9d4a8ae8fcb3a69b0d6b58f8c357c7b1bb2aa1 (patch)
tree2d39231a1a3d2430debe29781744d43fd2c95444 /src/corelib/io
parent90d83137fcb2f851d6c1d48790e3c1e7e2efeee9 (diff)
QDir: add note to docs about isAbsolutePath(":foo") returning true
As can be seen in the _q_resolveEntryAndCreateLegacyEngine_recursive method in QFileSystemEngine, paths starting with ':' are treated as QResources, which means that from QFileInfo's POV they're "not relative", which is why QDir::isAbsolutePath would return true. Change-Id: I701d08ce43ea707bc34c928e39bea0b83597a4b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 0da5726a43b21d1532720c8cd3c687cc2373cd2b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdir.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 5ce3fbcca8..a8826b331a 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1718,7 +1718,11 @@ bool QDir::isRoot() const
Returns \c true if \a path is absolute; returns \c false if it is
relative.
- \sa isAbsolute(), isRelativePath(), makeAbsolute(), cleanPath()
+ \note If \a path starts with ':', this function will return \c true
+ because paths starting with ':' are treated specially as they denote
+ a QResource.
+
+ \sa isAbsolute(), isRelativePath(), makeAbsolute(), cleanPath(), QResource
*/
/*!