From e999156cb42e674f121aa19f904ba969dd74cb00 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 7 Feb 2012 17:34:22 +0100 Subject: [PATCH] Disable Assertion messagebox for unittests. A messagebox will be shown for an assertion in debug mode. This introduces a need for user interaction to proceed the execution of the unit test. Setting the Report mode to debug, will only print the assertion to stderr. Change-Id: If8ae80ea96d6608cba77b9c6ca176f97d1680932 Reviewed-by: Friedemann Kleint Reviewed-by: Jason McDonald Reviewed-by: Joerg Bornemann --- src/testlib/qtestcase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 84b03b7323..0440e26aca 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1931,6 +1931,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) #endif #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX); #endif