diff options
author | Thiago Macieira <[email protected]> | 2025-05-15 08:03:16 -0700 |
---|---|---|
committer | Thiago Macieira <[email protected]> | 2025-05-23 20:36:45 -0700 |
commit | cf0c73e9fe12827d7ca3027f72573340154db02a (patch) | |
tree | dec03e3ae6ac7753a6b4124c73511653d0de57f2 | |
parent | 0409fa9edd7ec1634c517ad3b29345dece439262 (diff) |
QTest::CrashHandler: move the enum definition to the header
It's common between the two implementations, though currently completely
unused on Windows because we don't start debuggers.
Change-Id: I7a42db2db35cf6191693fffd3e4e46d482032630
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Ahmad Samir <[email protected]>
-rw-r--r-- | src/testlib/qtestcrashhandler_p.h | 9 | ||||
-rw-r--r-- | src/testlib/qtestcrashhandler_unix.cpp | 3 | ||||
-rw-r--r-- | src/testlib/qtestcrashhandler_win.cpp | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/testlib/qtestcrashhandler_p.h b/src/testlib/qtestcrashhandler_p.h index ff058ff3e66..80ec18a3efe 100644 --- a/src/testlib/qtestcrashhandler_p.h +++ b/src/testlib/qtestcrashhandler_p.h @@ -27,6 +27,15 @@ QT_BEGIN_NAMESPACE namespace QTest { namespace CrashHandler { + enum DebuggerProgram { + None, + Gdb, + Lldb, +#ifdef Q_OS_WIN + Cdb, +#endif + }; + bool alreadyDebugging(); void blockUnixSignals(); diff --git a/src/testlib/qtestcrashhandler_unix.cpp b/src/testlib/qtestcrashhandler_unix.cpp index 6d58a45e6ba..23ba8287d81 100644 --- a/src/testlib/qtestcrashhandler_unix.cpp +++ b/src/testlib/qtestcrashhandler_unix.cpp @@ -244,8 +244,6 @@ bool alreadyDebugging() #endif } -namespace { -enum DebuggerProgram { None, Gdb, Lldb }; static bool hasSystemCrashReporter() { #if defined(Q_OS_MACOS) @@ -254,7 +252,6 @@ static bool hasSystemCrashReporter() return false; #endif } -} // unnamed namespaced void maybeDisableCoreDump() { diff --git a/src/testlib/qtestcrashhandler_win.cpp b/src/testlib/qtestcrashhandler_win.cpp index 6a9f610eabd..62c6909f9c7 100644 --- a/src/testlib/qtestcrashhandler_win.cpp +++ b/src/testlib/qtestcrashhandler_win.cpp @@ -33,7 +33,6 @@ void maybeDisableCoreDump() { } -enum DebuggerProgram { None, Gdb, Lldb, Cdb }; static DebuggerProgram debugger = None; void prepareStackTrace() { |