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

No Windows debug output for ActiveQt DLL projects

    XMLWordPrintable

    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
      

        Attachments

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

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            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