Make qFatal() trigger the crash reporter on Windows

This commit is contained in:
Dominik Schmidt 2018-10-31 13:21:41 +01:00 committed by Kevin Ottens
parent 01e6f73da5
commit fd493a0598

View file

@ -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
}