summaryrefslogtreecommitdiff
path: root/src/app/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/main.cpp')
-rw-r--r--src/app/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 526ca15477..e96692b04f 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -29,6 +29,7 @@
**************************************************************************/
#include "qtsingleapplication.h"
+#include "../tools/qtcreatorcrashhandler/crashhandlersetup.h"
#include <app/app_version.h>
#include <extensionsystem/iplugin.h>
@@ -228,6 +229,8 @@ int main(int argc, char **argv)
const int threadCount = QThreadPool::globalInstance()->maxThreadCount();
QThreadPool::globalInstance()->setMaxThreadCount(qMax(4, 2 * threadCount));
+ setupCrashHandler(); // Display a backtrace once a serious signal is delivered.
+
#ifdef ENABLE_QT_BREAKPAD
QtSystemExceptionHandler systemExceptionHandler;
#endif
@@ -432,5 +435,7 @@ int main(int argc, char **argv)
QTimer::singleShot(100, &pluginManager, SLOT(startTests()));
#endif
- return app.exec();
+ const int r = app.exec();
+ cleanupCrashHandler();
+ return r;
}