Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
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