Add autotest for failing signal connection.
Change-Id: Iaae93253fa6d1ca0798d05d69a7ab6d6ff8b60bc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
ed1d0886ca
commit
992e50e421
@ -4129,11 +4129,17 @@ void tst_QObject::pointerConnect()
|
||||
r1->reset();
|
||||
r2->reset();
|
||||
ReceiverObject::sequence = 0;
|
||||
QTimer timer;
|
||||
|
||||
QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot1 ) );
|
||||
QVERIFY( connect( s, &SenderObject::signal1 , r2, &ReceiverObject::slot1 ) );
|
||||
QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot3 ) );
|
||||
QVERIFY( connect( s, &SenderObject::signal3 , r1, &ReceiverObject::slot3 ) );
|
||||
#if defined(Q_CC_GNU) && defined(Q_OS_UNIX)
|
||||
QEXPECT_FAIL("", "Test may fail due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.", Continue);
|
||||
#endif
|
||||
QVERIFY2( connect( &timer, &QTimer::timeout, r1, &ReceiverObject::deleteLater ),
|
||||
"Signal connection failed most likely due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.");
|
||||
|
||||
s->emitSignal1();
|
||||
s->emitSignal2();
|
||||
|
Loading…
Reference in New Issue
Block a user