Use Args List to start Crash Handler

This commit is contained in:
Florian Märkl 2019-04-10 21:10:30 +02:00
parent 059723b013
commit 177e436a2e

View File

@ -42,9 +42,8 @@ bool callback(const wchar_t *_dump_dir,
{ {
const QDir dir = QString::fromWCharArray(_dump_dir); const QDir dir = QString::fromWCharArray(_dump_dir);
const QString id = QString::fromWCharArray(_minidump_id); const QString id = QString::fromWCharArray(_minidump_id);
QProcess::startDetached(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath(),
+ " --start-crash-handler " { "--start-crash-handler", dir.filePath(id + ".dmp") });
+ dir.filePath(id + ".dmp"));
_exit(1); _exit(1);
return true; return true;
} }
@ -53,9 +52,8 @@ bool callback(const wchar_t *_dump_dir,
// Saves path to file // Saves path to file
bool callback(const google_breakpad::MinidumpDescriptor &md, void *context, bool b) bool callback(const google_breakpad::MinidumpDescriptor &md, void *context, bool b)
{ {
QProcess::startDetached(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath(),
+ " --start-crash-handler " { "--start-crash-handler", md.path() });
+ md.path());
_exit(1); _exit(1);
return true; return true;
} }
@ -66,9 +64,8 @@ bool callback(const char *dump_dir, const char *minidump_id, void *context, bool
{ {
const QDir dir = QString::fromUtf8(dump_dir); const QDir dir = QString::fromUtf8(dump_dir);
const QString id = QString::fromUtf8(minidump_id); const QString id = QString::fromUtf8(minidump_id);
QProcess::startDetached(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath(),
+ " --start-crash-handler " { "--start-crash-handler", dir.filePath(id + ".dmp") });
+ dir.filePath(id + ".dmp"));
_exit(1); _exit(1);
return true; return true;
} }