summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-30 15:07:11 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-08-01 22:18:47 +0200
commit3074a3a8feabd420abf1cbdeeca838f3ff2d85b7 (patch)
treeead021f441f4a22835f04866e4b25b46ea0f36f2
parent8e7fa2b5aa2e2e4371c4b73926d0e6ad2ebdbd96 (diff)
qmlplugindumper: do not pop up a window if an assert is triggeredv5.3.2
On windows the debug version of qmlplugindumper used to show a panel on assert failure. Failure should be silent. Done-with: Thomas Hartmann <thomas.hartmann@digia.com> Task-number: QTCREATORBUG-12644 Change-Id: I0491ab745a546687772cd0d70fb6b8be0f03bb75 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
-rw-r--r--tools/qmlplugindump/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 2b2bb85a..88d8fcea 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -68,6 +68,10 @@
#ifdef Q_OS_UNIX
#include <signal.h>
#endif
+#ifdef Q_OS_WIN
+#include <crtdbg.h>
+#include <qt_windows.h>
+#endif
QString pluginImportPath;
bool verbose = false;
@@ -533,6 +537,13 @@ void printUsage(const QString &appName)
int main(int argc, char *argv[])
{
+#ifdef Q_OS_WIN
+ // we do not want windows popping up if the module loaded triggers an assert
+ SetErrorMode(SEM_NOGPFAULTERRORBOX);
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
+#endif
#ifdef Q_OS_UNIX
// qmldump may crash, but we don't want any crash handlers to pop up
// therefore we intercept the segfault and just exit() ourselves