Inline information about FS case sensitivity
authorJoão Abecasis <joao.abecasis@nokia.com>
Sat, 4 Feb 2012 23:46:08 +0000 (00:46 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 6 Feb 2012 15:48:22 +0000 (16:48 +0100)
As far as Qt is concerned, this information is static and depends only
on the platform. By moving the definition to the header we allow the
information to be directly used by the compiler, forgoing the need to
export the function to interested users.

Change-Id: I43de585391d41204d3c3560ac6e65e5a88aee11c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
src/corelib/io/qfilesystemengine_p.h
src/corelib/io/qfilesystemengine_unix.cpp
src/corelib/io/qfilesystemengine_win.cpp

index 6d60d77..17413d9 100644 (file)
@@ -63,7 +63,14 @@ QT_BEGIN_NAMESPACE
 class QFileSystemEngine
 {
 public:
-    static bool isCaseSensitive();
+    static bool isCaseSensitive()
+    {
+#ifndef Q_OS_WIN
+        return true;
+#else
+        return false;
+#endif
+    }
 
     static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
     static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
index 52621eb..23a6b81 100644 (file)
@@ -87,11 +87,6 @@ static inline bool _q_isMacHidden(const char *nativePath)
 }
 #endif
 
-bool QFileSystemEngine::isCaseSensitive()
-{
-    return true;
-}
-
 //static
 QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data)
 {
index 6ebaada..b04018c 100644 (file)
@@ -472,11 +472,6 @@ void QFileSystemEngine::clearWinStatData(QFileSystemMetaData &data)
     data.lastWriteTime_ = FILETIME();
 }
 
-bool QFileSystemEngine::isCaseSensitive()
-{
-    return false;
-}
-
 //static
 QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link,
                                                   QFileSystemMetaData &data)