diff options
author | David Schulz <david.schulz@qt.io> | 2019-06-19 09:57:33 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2019-06-24 08:15:35 +0000 |
commit | 3717ca9574d82dd42405ebff14243111c078cf2a (patch) | |
tree | 203a504e35a0d709d5bcf04dd9dda8c982ddd782 /src/tools | |
parent | 7ceadd4c3fc9e2ee55036cfbfe2b883a0b027043 (diff) |
ensure the 'Auto' key is set while registering post mortem debugger
The 'Auto' indicates that the the registered post mortem debugger is
directly started after an unhandled user exception. If the value is
unset or set to '0' in rescent windows versions the debugger selection
dialog is not shown. Set this value to '1 ' to show the qtcdebugger
dialog, which also has an option to show the system dialog, if the user
does not want to debug the exception with Qt Creator.
Change-Id: I3160315060dbfb37bec5eaa677c4208900f574a4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qtcdebugger/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/qtcdebugger/main.cpp b/src/tools/qtcdebugger/main.cpp index 38507c8539..6beda7c1ec 100644 --- a/src/tools/qtcdebugger/main.cpp +++ b/src/tools/qtcdebugger/main.cpp @@ -419,6 +419,15 @@ static bool registerDebuggerKey(const WCHAR *key, do { if (!openRegistryKey(HKEY_LOCAL_MACHINE, key, true, &handle, access, errorMessage)) break; + + // Make sure to automatically open the qtcdebugger dialog on a crash + QString autoVal; + registryReadStringKey(handle, autoRegistryValueNameC, &autoVal, errorMessage); + if (autoVal != "1") { + if (!registryWriteStringKey(handle, autoRegistryValueNameC, "1", errorMessage)) + break; + } + // Save old key, which might be missing QString oldDebugger; if (isRegistered(handle, call, errorMessage, &oldDebugger)) { |