Refactor crashpad initialization

Crashpad handler was initialized quite late since we were waiting for settings. However the settings in crashpad are persistent itself, hence we can start it at the earliest possible time and change the upload settings independently later. The only prerequisite is to have QCoreApplication constructed in order for the application name to be available.
ref T652
This commit is contained in:
Roland Rossgotterer
2019-05-03 15:08:39 +02:00
committed by Klaus Basan
parent 99bcee87aa
commit a7509669f9
18 changed files with 407 additions and 273 deletions

View File

@@ -18,6 +18,7 @@
#include "blackmisc/logmessage.h"
#include "blackmisc/statusmessage.h"
#include "blackmisc/verify.h"
#include "blackmisc/crashhandler.h"
#include "blackconfig/buildconfig.h"
#include <QLabel>
@@ -164,8 +165,8 @@ namespace BlackGui
}
// crashpad info
sGui->crashAndLogInfoUserName(user.getRealNameAndId());
sGui->crashAndLogAppendInfo(QStringLiteral("Login as user %1 %2").arg(user.getRealNameAndId(), user.getRolesAsString()));
CCrashHandler::instance()->crashAndLogInfoUserName(user.getRealNameAndId());
CCrashHandler::instance()->crashAndLogAppendInfo(QStringLiteral("Login as user %1 %2").arg(user.getRealNameAndId(), user.getRolesAsString()));
}
else
{