Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
5.0.2
-
None
-
Windows
-
7fb3906d4e7cec7c69feee007b8393c9c2a3a316
Description
I have ActiveQt dll.
qDebug() doesn't produce output to MS Windows debug output, because qDefaultMessageHandler relies on usingWinMain variable (see below), which in case of Windows DLL project is 'false', so I see no regular Windows debug output, it's produced to stderr, which is inconvenient for non-console projects.
Src\qtbase\src\corelib\global\qlogging.cpp
static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &buf) { QString logMessage = qMessageFormatString(type, context, buf); #if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) #if !defined(Q_OS_WINCE) if (usingWinMain) #endif { OutputDebugString(reinterpret_cast<const wchar_t *>(logMessage.utf16())); return; } #endif // Q_OS_WIN
Attachments
For Gerrit Dashboard: QTBUG-32044 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
64599,4 | Windows logging: Fix check for console applications. | dev | qt/qtbase | Status: MERGED | +2 | 0 |