OSDN Git Service

QmlDesigner.qmlPuppet: avoid debug error messages boxes
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 24 Mar 2011 10:14:21 +0000 (11:14 +0100)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 24 Mar 2011 10:15:19 +0000 (11:15 +0100)
Wit this patch all crashes of qmldump are silent
now (in release mode).
This means Qt Quick Designer will just (silently) recover.

Reviewed-by: Kai Koehne
src/tools/qmlpuppet/main.cpp

index 90cee64..1147217 100644 (file)
 #include <qtsystemexceptionhandler.h>
 #endif
 
+#ifdef Q_OS_WIN
+#include <windows.h>
+#endif
+
 int main(int argc, char *argv[])
 {
     QApplication application(argc, argv);
@@ -60,5 +64,9 @@ int main(int argc, char *argv[])
 
     new QmlDesigner::NodeInstanceClientProxy(&application);
 
+#if defined(Q_OS_WIN) && defined(QT_NO_DEBUG)
+    SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
+#endif
+
     return application.exec();
 }