From 2ff0746e97acf37600b104838c96468f00953737 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 1 Nov 2013 16:16:15 +0100 Subject: Refactor plugin loading for WinRT Specify the root directory to be the package root. Only plugins inside the root can be opened (actually also only files). Furthermore current defaults to the package root now, which in most cases is identical to previous behavior. When attempting to load a plugin the path can either be specified in host format "C:/..." or as plugin absolute "/platforms/...". Check for both, with preference of latter case, like when qt.conf is used with / being used as plugin path. Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95 Reviewed-by: Friedemann Kleint Reviewed-by: Andrew Knight Reviewed-by: Oliver Wolff --- src/corelib/io/qfilesystementry.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/io/qfilesystementry.cpp') diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index 3934c6a673..42a724670e 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -169,6 +169,12 @@ void QFileSystemEntry::resolveNativeFilePath() const m_nativeFilePath = QDir::toNativeSeparators(m_filePath); #else m_nativeFilePath = QFile::encodeName(QDir::toNativeSeparators(m_filePath)); +#endif +#ifdef Q_OS_WINRT + while (m_nativeFilePath.startsWith(QLatin1Char('\\'))) + m_nativeFilePath.remove(0,1); + if (m_nativeFilePath.isEmpty()) + m_nativeFilePath.append(QLatin1Char('.')); #endif } } -- cgit v1.2.3