From 3717ca9574d82dd42405ebff14243111c078cf2a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 19 Jun 2019 09:57:33 +0200 Subject: 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 Reviewed-by: Christian Stenger --- src/tools/qtcdebugger/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools') 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)) { -- cgit v1.2.3