make QtCriticalMsg fatal if QT_FATAL_WARNINGS is set

if warnings are fatal, then critical messages should be even more so.

Change-Id: I3681fa1fc606337006f1781dd961ea9cf6ce282d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-03-06 12:34:29 +01:00 committed by The Qt Project
parent 77057674fb
commit b7155b6c07

View File

@ -76,7 +76,7 @@ static bool isFatal(QtMsgType msgType)
if (msgType == QtFatalMsg)
return true;
if (msgType == QtWarningMsg) {
if (msgType == QtWarningMsg || msgType == QtCriticalMsg) {
static bool fatalWarnings = !qEnvironmentVariableIsEmpty("QT_FATAL_WARNINGS");
return fatalWarnings;
}