Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-32044

No Windows debug output for ActiveQt DLL projects

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • 5.2.0
    • 5.0.2
    • ActiveX Support
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            zandr Andrei Zakharov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes