Details
-
Type:
Suggestion
-
Status: Closed
-
Priority:
Not Evaluated
-
Resolution: Done
-
Affects Version/s: 5.0.2
-
Fix Version/s: 5.2.0
-
Component/s: ActiveX Support
-
Labels:None
-
Environment:
Windows
-
Commits: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