1
0
mirror of https://github.com/danog/patches.git synced 2024-11-26 20:04:45 +01:00
patches/qtbase_5_12_8/0016-fix-launching-mail-program-on-windows.patch

16 lines
753 B
Diff
Raw Permalink Normal View History

diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index 9504513a5e..811f3d62bd 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -125,6 +125,10 @@ static inline bool launchMail(const QUrl &url)
command.prepend(doubleQuote);
}
}
+
+ // Patch: Fix mail launch if no param is expected in this command.
+ if (command.indexOf(QStringLiteral("%1")) < 0) return false;
+
// Pass the url as the parameter. Should use QProcess::startDetached(),
// but that cannot handle a Windows command line [yet].
command.replace(QLatin1String("%1"), url.toString(QUrl::FullyEncoded));