Add experimental/optional crashpad integration

This commit is contained in:
Igor Malinovskiy
2019-08-29 14:31:36 +03:00
parent b86cabb41f
commit ddabc58751
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -2,6 +2,10 @@
#include <QFileInfo>
#include <QGuiApplication>
#ifdef CRASHPAD_INTEGRATION
#include "crashpad/handler.h"
#endif
#include "app/app.h"
#define RESTART_CODE 1000
@@ -13,6 +17,12 @@ int main(int argc, char *argv[])
#endif
int returnCode = 0;
#ifdef CRASHPAD_INTEGRATION
QFileInfo appPath(QString::fromLocal8Bit(argv[0]));
QString appDir(appPath.absoluteDir().path());
startCrashpad(appDir);
#endif
do
{
Application a(argc, argv);