summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-30 15:42:58 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-08-01 22:19:53 +0200
commit06ec7ba87111caa62f9317c6559fc78e68ade1c2 (patch)
treee5d6cff7b037aceca48914c702fe7588cf8532cb /tools
parent416272fbc4a6b88433eed7f01a37dd77b02b327f (diff)
downloadqt4-tools-06ec7ba87111caa62f9317c6559fc78e68ade1c2.tar.gz
qmlplugindumper: do not pop up a window if an assert is triggered
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: I568f27e7d848aeafbffa059599f33b1b7ce0d2b9 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools')
-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 468d82c64f..ff0c525f0b 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -64,6 +64,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;
@@ -494,6 +498,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