diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-14 14:06:20 +0100 |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-20 14:35:05 +0100 |
commit | 4bdf081da0276f55662de826568441ca0e85e877 (patch) | |
tree | b632860ecbc420d322497d029d4a3c61235ce270 /src/corelib/io/qfilesystementry_p.h | |
parent | 366d2ed09ebf5aa27171a46d723497e5aaa5dd06 (diff) |
Move QDir::fromNativeSeparators call to the QFileSystemEntry constructor
The m_filePath should always have / as the separator, while m_nativeFilePath
should always have the native separator.
Almost every place the constructor is used, the path could be one passed
into an API from code outside our control.
So it's easier to do the path conversion in the constructor than to have to
remember to call fromNativeSeparators in every place a QFileSystemEntry is
constructed (especially since unix tests won't reveal any error)
Reviewed-By: joao
Diffstat (limited to 'src/corelib/io/qfilesystementry_p.h')
-rw-r--r-- | src/corelib/io/qfilesystementry_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h index 7a9c2a5a3a..2ce0a839e1 100644 --- a/src/corelib/io/qfilesystementry_p.h +++ b/src/corelib/io/qfilesystementry_p.h @@ -72,10 +72,12 @@ public: typedef QString NativePath; #endif struct FromNativePath{}; + struct FromInternalPath{}; QFileSystemEntry(); explicit QFileSystemEntry(const QString &filePath); + QFileSystemEntry(const QString &filePath, FromInternalPath dummy); QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath dummy); QFileSystemEntry(const QString &filePath, const NativePath &nativeFilePath); |