summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2012-02-07 17:34:22 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-08 09:53:23 +0100
commite999156cb42e674f121aa19f904ba969dd74cb00 (patch)
tree428790e0160ee5dfcd2b7351487f7ce3135e7190 /src/testlib/qtestcase.cpp
parenta2bea730c2047b2fc22bcc129b3dcfeef89a379d (diff)
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 <Friedemann.Kleint@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r--src/testlib/qtestcase.cpp1
1 files changed, 1 insertions, 0 deletions
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