summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-04-20 14:09:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-04-23 06:09:44 +0000
commit84a49594d0bde29668fb66187ac1ef2c842393a3 (patch)
tree6095b0b74e372ed5a22fcfc5a6a30890fafef9b2 /tests
parent21b3e2265a06a6bf45ef63f7da3b9dc609c47c31 (diff)
Windows/tst_QTcpServer: Suppress crash notification of crashingServer.
Suppress message dialog of the test helper as does QTestlib. Task-number: QTBUG-52714 Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
index b53842e6ca..2b00af218a 100644
--- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
+++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
@@ -34,9 +34,16 @@
#include <QtCore>
#include <QtNetwork>
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC)
+# include <crtdbg.h>
+#endif
int main(int argc, char *argv[])
{
+ // Windows: Suppress crash notification dialog.
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC)
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
+#endif
QCoreApplication app(argc, argv);
QTcpServer server;