summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-10-11 08:07:35 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-10-11 08:07:35 (GMT)
commit9849d8f5f1c0c3f03d3f83cc51eea2beb3d9cbbc (patch)
treed2858b4e2da4597f740e472789aab07e55cac2e5 /src/declarative
parente67800d9e0dc82a38b01c9b8eff4dc1a10f306d8 (diff)
downloadQt-9849d8f5f1c0c3f03d3f83cc51eea2beb3d9cbbc.zip
Qt-9849d8f5f1c0c3f03d3f83cc51eea2beb3d9cbbc.tar.gz
Qt-9849d8f5f1c0c3f03d3f83cc51eea2beb3d9cbbc.tar.bz2
Fix autotest on windows
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 7ed925a..d768882 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2196,7 +2196,19 @@ bool QDeclarative_isFileCaseCorrect(const QString &fileName)
QFileInfo info(fileName);
QString absolute = info.absoluteFilePath();
+
+#if defined(Q_OS_MAC)
QString canonical = info.canonicalFilePath();
+#elif defined(Q_OS_WIN)
+ wchar_t buffer[1024];
+
+ DWORD rv = ::GetShortPathName((wchar_t*)absolute.utf16(), buffer, 1024);
+ if (rv == 0 || rv >= 1024) return true;
+ rv = ::GetLongPathName(buffer, buffer, 1024);
+ if (rv == 0 || rv >= 1024) return true;
+
+ QString canonical((QChar *)buffer);
+#endif
int absoluteLength = absolute.length();
int canonicalLength = canonical.length();