summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsservices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsservices.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index 6cc56372ec..7f9c9bd205 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -54,8 +54,9 @@ enum { debug = 0 };
static inline bool shellExecute(const QUrl &url)
{
- 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<quintptr>(ShellExecute(0, 0,
reinterpret_cast<const wchar_t *>(nativeFilePath.utf16()),