From: Dominik Schmidt Date: Wed, 31 Oct 2018 12:21:41 +0000 (+0100) Subject: Make qFatal() trigger the crash reporter on Windows X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~126^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fd493a059888809a294d501ef17d209c03f31480;p=nextcloud-desktop.git Make qFatal() trigger the crash reporter on Windows --- diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index 91446553e..b5c0dfbab 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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 }