diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index c1471e4f21..9bd54bd035 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -75,6 +75,7 @@ private slots: void findChildren(); void connectDisconnectNotify_data(); void connectDisconnectNotify(); + void connectNotifyPtr(); void emitInDefinedOrder(); void customTypes(); void streamCustomTypes(); @@ -849,6 +850,19 @@ void tst_QObject::connectDisconnectNotify() delete r; } +void tst_QObject::connectNotifyPtr() +{ + NotifyObject *s = new NotifyObject; + NotifyObject *r = new NotifyObject; + + connect( (SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, &ReceiverObject::slot1 ); + QCOMPARE( s->org_signal, s->nw_signal ); + QCOMPARE( s->org_signal.toLatin1(), QMetaObject::normalizedSignature(SIGNAL(signal1()))); + + delete s; + delete r; +} + class SequenceObject : public ReceiverObject { Q_OBJECT |