diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-12-07 17:05:35 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-12-08 08:14:48 +0000 |
commit | 2baeeb4026e55955a329480b2550a4353291f8ca (patch) | |
tree | ffafcf92c2d7fe248a1e40061f040b307e7fd045 /src | |
parent | 64ab4de4b0abb19fad18e009dfd094f1ae6a78c1 (diff) |
Win: Use native separators in QLibrary errors
Fixes output like
plugin cannot be loaded for module "QtWebEngine": Cannot load library D:/dev/qt/5.6/msvc-2015-32/qtbase/qml/QtWebEngine/qtwebengineplugind.dll: The specified procedure could not be found.
Change-Id: I159113a6a1f40b924905da15267a42e5b627d56e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/plugin/qlibrary_win.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp index c1ce198c84..f5604a24bd 100644 --- a/src/corelib/plugin/qlibrary_win.cpp +++ b/src/corelib/plugin/qlibrary_win.cpp @@ -124,7 +124,8 @@ bool QLibraryPrivate::load_sys() SetErrorMode(oldmode); #endif if (!pHnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName).arg(qt_error_string()); + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName)).arg(qt_error_string()); } else { // Query the actual name of the library that was loaded errorString.clear(); @@ -148,7 +149,8 @@ bool QLibraryPrivate::load_sys() bool QLibraryPrivate::unload_sys() { if (!FreeLibrary(pHnd)) { - errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName).arg(qt_error_string()); + errorString = QLibrary::tr("Cannot unload library %1: %2").arg( + QDir::toNativeSeparators(fileName)).arg(qt_error_string()); return false; } errorString.clear(); @@ -164,7 +166,8 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol) #endif if (!address) { errorString = QLibrary::tr("Cannot resolve symbol \"%1\" in %2: %3").arg( - QString::fromLatin1(symbol)).arg(fileName).arg(qt_error_string()); + QString::fromLatin1(symbol)).arg( + QDir::toNativeSeparators(fileName)).arg(qt_error_string()); } else { errorString.clear(); } |