diff options
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r-- | src/corelib/plugin/qlibrary_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary_win.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 2aed877e6b..e89d6396f6 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -190,7 +190,7 @@ bool QLibraryPrivate::load_sys() } #endif -#if defined(Q_OS_AIX) // Not sure if any other platform actually support this thing. +#if defined(Q_OS_AIX) // Not sure if any other platform actually support this thing. if (loadHints & QLibrary::LoadArchiveMemberHint) { dlFlags |= RTLD_MEMBER; } diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp index 928f2c5eb1..b9494a3041 100644 --- a/src/corelib/plugin/qlibrary_win.cpp +++ b/src/corelib/plugin/qlibrary_win.cpp @@ -107,12 +107,16 @@ bool QLibraryPrivate::load_sys() attempts.append(QFileInfo(fileName).absoluteFilePath()); #endif } +#ifdef Q_OS_WINRT + if (fileName.startsWith(QLatin1Char('/'))) + attempts.prepend(QDir::rootPath() + fileName); +#endif Q_FOREACH (const QString &attempt, attempts) { #ifndef Q_OS_WINRT pHnd = LoadLibrary((wchar_t*)QDir::toNativeSeparators(attempt).utf16()); #else // Q_OS_WINRT - QString path = QDir::toNativeSeparators(QDir::current().relativeFilePath(fileName)); + QString path = QDir::toNativeSeparators(QDir::current().relativeFilePath(attempt)); pHnd = LoadPackagedLibrary((LPCWSTR)path.utf16(), 0); if (pHnd) qualifiedFileName = attempt; |