From cc517d7cd983d9444e9690353ea7ca7ee30740ef Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 15 Aug 2016 13:14:05 +0200 Subject: QWindowsServices::openUrl(): Don't convert URLs with fragments/queries to local files Pass the URL instead. Task-number: QTBUG-55300 Change-Id: I4ce9171db5c1a9e07b17911729b165c115329664 Reviewed-by: Thiago Macieira --- src/plugins/platforms/windows/qwindowsservices.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows') diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp index ae63ac46ae..1d23a9d9b9 100644 --- a/src/plugins/platforms/windows/qwindowsservices.cpp +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -51,8 +51,9 @@ enum { debug = 0 }; static inline bool shellExecute(const QUrl &url) { #ifndef Q_OS_WINCE - const QString nativeFilePath = - url.isLocalFile() ? QDir::toNativeSeparators(url.toLocalFile()) : url.toString(QUrl::FullyEncoded); + const QString nativeFilePath = url.isLocalFile() && !url.hasFragment() && !url.hasQuery() + ? QDir::toNativeSeparators(url.toLocalFile()) + : url.toString(QUrl::FullyEncoded); const quintptr result = reinterpret_cast(ShellExecute(0, 0, reinterpret_cast(nativeFilePath.utf16()), -- cgit v1.2.3