de-duplicate and accelerate code

... by using existing function.

Change-Id: I25e60e70b307885c46b03b6458f06a561976590c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-03-06 12:33:33 +01:00 committed by The Qt Project
parent 27b3746b33
commit 77057674fb

View File

@ -171,9 +171,7 @@ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) Q_DECL
fflush(stderr); fflush(stderr);
#endif #endif
if (msgType == QtFatalMsg if (isFatal(msgType)) {
|| (msgType == QtWarningMsg
&& qEnvironmentVariableIsSet("QT_FATAL_WARNINGS"))) {
#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) #if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
// get the current report mode // get the current report mode
int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW); int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);