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

QSignalSpy for all signals and slots, like the -vs/QSignalDumper option for QtTest

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      Please make QSignalDumper in QtTest available for Qt applications. It would be like QSignalSpy, but for all signal and slot events.

      The '-vs' option to QtTest produces a dynamic trace of signal and slot events (qtbase/src/testlib/qsignaldumper.cpp). It writes its events to qPrintMessage. On Windows, these messages go to the debugger's output window.

      Signals and slots are particularly important for understanding the flow of control in GUI applications.

      My application has a custom logging framework which stores log events in a circular buffer. It includes a QtMessageHandler which captures qDebug() output. Since QSignalDumper writes to qPrintMessage, its events are not recorded.

      QSignalSpy tracks individual signals. It does not track all signals, nor does it report slot events.

      As a workaround on Windows, it appears that EVENT_TRACE_FLAG_DBGPRINT would turn qPrintMessage into real-time events. I don't see how to configure this option without a kernel access to Windows.

      See INC-1507451 – How to capture -vs output from QtTest (Signal-Slot events)
      https://account.qt.io/support/request/INC-1507451

        Attachments

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

          Activity

            People

            Assignee:
            macadder Jason McDonald
            Reporter:
            bbarber Brad Barber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes