Fix code indentation and comment formatting

Change-Id: Ic94200988add19d608648c8d3bd56bbfe74bde79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Kai Koehne 2013-06-18 09:24:07 +02:00 committed by The Qt Project
parent 25739bebba
commit d806944f06

View File

@ -918,20 +918,18 @@ static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const
{
#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
wchar_t contextFileL[256];
// we probably should let the compiler do this for us, by
// declaring QMessageLogContext::file to be const wchar_t * in
// the first place, but the #ifdefery above is very complex
// and we wouldn't be able to change it later on...
convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL, context.file);
// we probably should let the compiler do this for us, by declaring QMessageLogContext::file to
// be const wchar_t * in the first place, but the #ifdefery above is very complex and we
// wouldn't be able to change it later on...
convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL,
context.file);
// get the current report mode
int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
_CrtSetReportMode(_CRT_ERROR, reportMode);
int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL,
context.line, _CRT_WIDE(QT_VERSION_STR),
reinterpret_cast<const wchar_t *> (
message.utf16()));
if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW)
int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL, context.line, _CRT_WIDE(QT_VERSION_STR),
reinterpret_cast<const wchar_t *>(message.utf16()));
if ((ret == 0) && (reportMode & _CRTDBG_MODE_WNDW))
return; // ignore
else if (ret == 1)
_CrtDbgBreak();