Show correct origin of Q_ASSERT in Windows dialog

Display the actual file and line where the Q_ASSERT statement
was triggered.

Change-Id: I54d72f4c4bd9edee744c0f6e08f31b8e3120f454
Reviewed-by: David Faure <faure@kde.org>
This commit is contained in:
Kai Koehne 2012-03-21 10:15:01 +01:00 committed by Qt by Nokia
parent 5ec17700fa
commit 3f3dd8f1d3

View File

@ -717,10 +717,10 @@ void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, con
int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
_CrtSetReportMode(_CRT_ERROR, reportMode);
#if !defined(Q_OS_WINCE)
int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf);
int ret = _CrtDbgReport(_CRT_ERROR, context.file, context.line, QT_VERSION_STR, buf);
#else
int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__),
__LINE__, _CRT_WIDE(QT_VERSION_STR),
int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(context.file),
context.line, _CRT_WIDE(QT_VERSION_STR),
reinterpret_cast<const wchar_t *> (
QString::fromLatin1(buf).utf16()));
#endif