Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12
-
None
Description
In QTest's documentation and help-text it is listed that the signal dumper will list signal emissions and resulting slot invocations. Signal emissions are indeed listed, but slot invocations are not
-vs : Log every signal emission and resulting slot invocations
The issue only occurs with QueuedConnections (this is possibly 'intended') and the new-style connect syntax.
E.g., the two following functions yield different output.
void tst_Signaldumper::oneSlot()
{
SignalSlotClass signalSlotOwner;
// parameterless to parameterless
auto connection = connect(&signalSlotOwner, &SignalSlotClass::signalWithoutParameters,
&signalSlotOwner, &SignalSlotClass::slotWithoutParameters);
emit signalSlotOwner.signalWithoutParameters();
}
vs
void tst_Signaldumper::oneSlotOldSyntax()
{
SignalSlotClass signalSlotOwner;
// parameterless to parameterless
auto connection = connect(&signalSlotOwner, SIGNAL(signalWithoutParameters()),
&signalSlotOwner, SLOT(slotWithoutParameters()));
emit signalSlotOwner.signalWithoutParameters();
}
Has the output:
INFO : tst_Signaldumper::initTestCase() Signal: QThread(55653adb8160) started () PASS : tst_Signaldumper::initTestCase() INFO : tst_Signaldumper::oneSlot(direct) Signal: SignalSlotClass(7ffe14e6c870) signalWithoutParameters () PASS : tst_Signaldumper::oneSlot(direct) INFO : tst_Signaldumper::oneSlotOldSyntax(direct) Signal: SignalSlotClass(7ffe14e6c890) signalWithoutParameters () INFO : tst_Signaldumper::oneSlotOldSyntax(direct) Slot: SignalSlotClass(7ffe14e6c890) slotWithoutParameters() PASS : tst_Signaldumper::oneSlotOldSyntax(direct) PASS : tst_Signaldumper::cleanupTestCase() INFO : tst_Signaldumper::UnknownTestFunc() Signal: QThread(55653adb8160) finished ()
Note how oneSlotOldSyntax has slot invocations, and oneSlot does not.
Attachments
Issue Links
- relates to
-
QTBUG-118149 Document QTest's SignalDumper
- Reported