diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-03-21 10:15:01 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-22 08:51:48 +0100 |
commit | 3f3dd8f1d3219b63582986996cd01e8bb6effc9c (patch) | |
tree | 2119179bf23c1d8c48ad761672624fc6aaac8fca /src | |
parent | 5ec17700fa0935ab9a2732c47fbf88fea3be825b (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<const wchar_t *> ( QString::fromLatin1(buf).utf16())); #endif |