projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01e6f73
)
Make qFatal() trigger the crash reporter on Windows
author
Dominik Schmidt
<dev@dominik-schmidt.de>
Wed, 31 Oct 2018 12:21:41 +0000
(13:21 +0100)
committer
Kevin Ottens
<kevin.ottens@nextcloud.com>
Wed, 1 Jul 2020 12:54:32 +0000
(14:54 +0200)
src/libsync/logger.cpp
patch
|
blob
|
history
diff --git
a/src/libsync/logger.cpp
b/src/libsync/logger.cpp
index 91446553e35041510672fee54f85c034028920c3..b5c0dfbab309161d7e31ed01061dadfd512da572 100644
(file)
--- a/
src/libsync/logger.cpp
+++ b/
src/libsync/logger.cpp
@@
-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
}