diff options
author | Yuhang Zhao <zhaoyuhang@rankyee.com> | 2023-05-23 17:57:56 +0800 |
---|---|---|
committer | Yuhang Zhao <yuhangzhao@deepin.org> | 2023-07-19 04:43:06 +0000 |
commit | b3930b03cd6519db068bf0fca45d3e32ff7ce2df (patch) | |
tree | c9c4c1c7d99056ac14288640dc0f4efddcbad502 /src/plugins/platforms/windows/qwindowsservices.cpp | |
parent | 14d10c632bad3346d404271535e6225d226afaa5 (diff) |
Windows QPA: fix mail launch in case parameter is wrong
Done-with: Ilya Fedin <fedin-ilja2010@ya.ru>
Pick-to: 6.6 6.5
Change-Id: I7b24ed64533cdf26f3f3d7dba4b5e80490be269c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsservices.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp index d9bb76d10a..491ae8bbc8 100644 --- a/src/plugins/platforms/windows/qwindowsservices.cpp +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -154,6 +154,11 @@ static inline bool launchMail(const QUrl &url) qWarning("Cannot launch '%ls': There is no mail program installed.", qUtf16Printable(url.toString())); return false; } + // Fix mail launch if no param is expected in this command. + if (command.indexOf(QStringLiteral("%1")) < 0) { + qWarning() << "The mail command lacks the '%1' parameter."; + return false; + } //Make sure the path for the process is in quotes const QChar doubleQuote = u'"'; if (!command.startsWith(doubleQuote)) { |