summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsservices.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-28 09:23:03 +0200
committerLiang Qi <liang.qi@qt.io>2017-03-28 09:28:31 +0200
commitb48a13fd6843e12b5725aa3ff0d010007e7c43b4 (patch)
tree316cfe36fc67906efcd92ff806c7c0da56ed4f8e /src/plugins/platforms/windows/qwindowsservices.cpp
parent3398d9d40cb0dae2dc2a1a4f7dc3b4b9cceae903 (diff)
parent15fe60cfdada84ea519f08e905d59cc3fb6d20cd (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsservices.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index 7f9c9bd205..48332b35f8 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -98,7 +98,11 @@ static inline QString mailCommand()
RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast<unsigned char*>(command), &bufferSize);
RegCloseKey(handle);
}
- if (!command[0])
+ // QTBUG-57816: As of Windows 10, if there is no mail client installed, an entry like
+ // "rundll32.exe .. url.dll,MailToProtocolHandler %l" is returned. Launching it
+ // silently fails or brings up a broken dialog after a long time, so exclude it and
+ // fall back to ShellExecute() which brings up the URL assocation dialog.
+ if (!command[0] || wcsstr(command, L",MailToProtocolHandler") != nullptr)
return QString();
wchar_t expandedCommand[MAX_PATH] = {0};
return ExpandEnvironmentStrings(command, expandedCommand, MAX_PATH) ?