diff options
author | Alejandro Exojo <suy@badopi.org> | 2014-03-07 12:20:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-14 18:20:21 +0100 |
commit | 6d05f5faff8b125c3e43192b857990e7f0ff208d (patch) | |
tree | 88401bc3d514b008ad5b2c64958306307a4733ac /src/corelib/global/qlogging.cpp | |
parent | 2e49b7a3b99a0f02c2521656fa2f573c2ea40150 (diff) |
Make QtCriticalMsg exit on QT_FATAL_CRITICALS
Change-Id: I92e8f9851dd074f3bcded6981f5545d1e93b549f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 64dd544cf0..d8ef8a57a8 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -83,6 +83,11 @@ static bool isFatal(QtMsgType msgType) if (msgType == QtFatalMsg) return true; + if (msgType == QtCriticalMsg) { + static bool fatalCriticals = !qEnvironmentVariableIsEmpty("QT_FATAL_CRITICALS"); + return fatalCriticals; + } + if (msgType == QtWarningMsg || msgType == QtCriticalMsg) { static bool fatalWarnings = !qEnvironmentVariableIsEmpty("QT_FATAL_WARNINGS"); return fatalWarnings; |