diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-11-25 09:47:42 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-11-25 09:58:06 (GMT) |
commit | 79281991e21bb5bd3a6f3288ac934aa4c2b33fcd (patch) | |
tree | 65a30ac7261817d608516f9b5c953ff639145d55 /src/corelib/io | |
parent | 04c3d2e98cebd16a357923ab71a95882e4667ef7 (diff) | |
download | Qt-79281991e21bb5bd3a6f3288ac934aa4c2b33fcd.zip Qt-79281991e21bb5bd3a6f3288ac934aa4c2b33fcd.tar.gz Qt-79281991e21bb5bd3a6f3288ac934aa4c2b33fcd.tar.bz2 |
Let's use engine's understanding of relative path
As much as I'd like to have the definition of "relative" be independent
of custom engines, the current architecture prevents us from doing that
without introducing knowledge about them in QFileSystemEntry. Fixing
this specifically for resource files would be possible, but let's not
break custom engines... just yet.
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdir.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 22a3baa..e1fed0d 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1544,7 +1544,9 @@ bool QDir::isRoot() const */ bool QDir::isRelative() const { - return d_ptr->dirEntry.isRelative(); + if (d_ptr->fileEngine.isNull()) + return d_ptr->dirEntry.isRelative(); + return d_ptr->fileEngine->isRelativePath(); } diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 471da2e..9041c94 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -623,7 +623,9 @@ bool QFileInfo::isRelative() const Q_D(const QFileInfo); if (d->isDefaultConstructed) return true; - return d->fileEntry.isRelative(); + if (d->fileEngine == 0) + return d->fileEntry.isRelative(); + return d->fileEngine->isRelativePath(); } /*! |