diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-17 13:04:27 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-17 14:00:21 (GMT) |
commit | 206f49020bce11e142c4290b6655ac7c15592b43 (patch) | |
tree | 07c55b419f57a9bd6a0af71ddc79ef9309a58fa8 /src/corelib/io/qfilesystemengine_symbian.cpp | |
parent | 3df81c23e6ab7dae949315a4f0ca4e54469ab2bf (diff) | |
download | Qt-206f49020bce11e142c4290b6655ac7c15592b43.zip Qt-206f49020bce11e142c4290b6655ac7c15592b43.tar.gz Qt-206f49020bce11e142c4290b6655ac7c15592b43.tar.bz2 |
Differntiate different types of absolute paths on windows.
QFileSystemEntry now differentiates between various types of absolute
paths on Windows and Symbian. The new behavior is shown the table below.
Anybody who uses this class should NOT treat that !isRelative() == isAbsolute().
The differentiation is puerly for internal use by the windows
and symbian implementations of QFileSystemEngine.
|============================================|
|Filename isRelative isAbsolute |
|============================================|
| Somefile.txt 1 0 |
| Some/file.txt 1 0 |
| a:Somefile.txt 0 0 |
| /Somefile.txt 0 0 |
| a:/somefile.txt 0 1 |
| //abc/somefile.txt 0 1 |
|============================================|
Reviewed-by: Joao
Reviewed-by: Shane Kearns
Diffstat (limited to 'src/corelib/io/qfilesystemengine_symbian.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_symbian.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp index 02b4c48..b4f0f88 100644 --- a/src/corelib/io/qfilesystemengine_symbian.cpp +++ b/src/corelib/io/qfilesystemengine_symbian.cpp @@ -114,7 +114,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry) const bool isDriveRelative = (orig.size() > 2 && orig.at(1).unicode() == ':' && orig.at(2).unicode() != '/'); const bool isDirty = (orig.contains(QLatin1String("/../")) || orig.contains(QLatin1String("/./")) || orig.endsWith(QLatin1String("/..")) || orig.endsWith(QLatin1String("/."))); - const bool isAbsolute = entry.isAbsolute(); + const bool isAbsolute = !entry.isRelative(); if (isAbsolute && !(needsDrive || isDriveLetter || isDriveRelative || isDirty)) return entry; |