mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Make qFatal() trigger the crash reporter on Windows
This commit is contained in:
parent
01e6f73da5
commit
fd493a0598
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <QDir>
|
||||
#include <QStringList>
|
||||
#include <QThread>
|
||||
#include <QtGlobal>
|
||||
#include <qmetaobject.h>
|
||||
|
||||
#include <zlib.h>
|
||||
|
@ -37,6 +38,13 @@ static void mirallLogCatcher(QtMsgType type, const QMessageLogContext &ctx, cons
|
|||
} else if (!logger->isNoop()) {
|
||||
logger->doLog(qFormatLogMessage(type, ctx, message));
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
// Make application terminate in a way that can be caught by the crash reporter
|
||||
if(type == QtFatalMsg) {
|
||||
Utility::crash();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue