From 3f3dd8f1d3219b63582986996cd01e8bb6effc9c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 21 Mar 2012 10:15:01 +0100 Subject: 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 --- src/corelib/global/qlogging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 8cbd4528dc..fedc5eb9ec 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -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 ( QString::fromLatin1(buf).utf16())); #endif -- cgit v1.2.3