aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-30 14:49:26 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-08-01 22:18:29 +0200
commitd676b0ec019a34b639a11ab224f226e678f272ce (patch)
tree16d5cc1ff6fda311c769450ce348d230644a7c31 /tools
parentf3d91c243837a3adf473f951819df82ed86c669a (diff)
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: Ib5036754b37cdd5e3820e0cfd60b3ef7df3f1fb6 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 192c85513f..4934d20f75 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -69,6 +69,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;
@@ -732,6 +736,13 @@ void printDebugMessage(QtMsgType, const QMessageLogContext &, const QString &msg
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
// The default message handler might not print to console on some systems. Enforce this.
qInstallMessageHandler(printDebugMessage);
#ifdef Q_OS_UNIX