From 2baeeb4026e55955a329480b2550a4353291f8ca Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 7 Dec 2015 17:05:35 +0100 Subject: 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 Reviewed-by: Thiago Macieira --- src/corelib/plugin/qlibrary_win.cpp | 9 ++++++--- 1 file 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(); } -- cgit v1.2.3