summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcrashhandler_win.cpp
diff options
context:
space:
mode:
authorThiago Macieira <[email protected]>2025-05-16 08:16:46 -0700
committerThiago Macieira <[email protected]>2025-05-23 20:36:45 -0700
commit9a66c7c1b9e1488f54f6ecfaab714fdc2e770a7d (patch)
tree5e0e6e0e7de646945ea5eacf0cf5f084cfdc9522 /src/testlib/qtestcrashhandler_win.cpp
parentfc7c5c0a2b932906c96d8b104bab05a0aa64443f (diff)
QTest::CrashHandler: move windowsFaultHandler() out of the class
It accesses no members (there are none!), which further simplifies the header. Change-Id: Ic1251d8b56dc6cfeb136fffd7baf4d8bc7143750 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
Diffstat (limited to 'src/testlib/qtestcrashhandler_win.cpp')
-rw-r--r--src/testlib/qtestcrashhandler_win.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/testlib/qtestcrashhandler_win.cpp b/src/testlib/qtestcrashhandler_win.cpp
index 8afb45e7b02..f814a6bc68e 100644
--- a/src/testlib/qtestcrashhandler_win.cpp
+++ b/src/testlib/qtestcrashhandler_win.cpp
@@ -16,6 +16,7 @@
#if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR))
# include <crtdbg.h>
#endif
+#include <qt_windows.h>
QT_BEGIN_NAMESPACE
@@ -168,6 +169,8 @@ DebugSymbolResolver::Symbol DebugSymbolResolver::resolveSymbol(DWORD64 address)
}
} // unnamed namespace
+static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo);
+
WindowsFaultHandler::WindowsFaultHandler()
{
# if !defined(Q_CC_MINGW)
@@ -177,7 +180,7 @@ WindowsFaultHandler::WindowsFaultHandler()
SetUnhandledExceptionFilter(windowsFaultHandler);
}
-LONG WINAPI WindowsFaultHandler::windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
+static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
{
enum { maxStackFrames = 100 };
char appName[MAX_PATH];