aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlnotifier
diff options
context:
space:
mode:
authorAlan Alpert <416365416c@gmail.com>2013-11-16 12:45:15 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-17 12:42:48 +0100
commita5d0ed01c8cbda9d6ec7e1a30b3f1266d3a277f8 (patch)
tree9c1bb937fc7693ac8c99b681c4549f7d723d80f0 /tests/auto/qml/qqmlnotifier
parentb3d0da4ee63fc42ad8c1d99fd292faefb499ca9a (diff)
Don't call receivers from disconnectNotify
A pending documentation update is going to explain that you can't call into QObject functions from disconnectNotify, or it may deadlock on the signalSlot mutex. Task-number: QTBUG-34829 Change-Id: I57e7b4e457d813d4255c8cdbe36228b2e0f45aaa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlnotifier')
-rw-r--r--tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
index fa3b190826..f1b48df437 100644
--- a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
+++ b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
@@ -98,6 +98,7 @@ public:
void verifyReceiverCount()
{
+ //Note: QTBUG-34829 means we can't call this from within disconnectNotify or it can lock
QCOMPARE(receivers(SIGNAL(qmlObjectPropChanged())), qmlObjectPropConnections);
QCOMPARE(receivers(SIGNAL(cppObjectPropChanged())), cppObjectPropConnections);
QCOMPARE(receivers(SIGNAL(unboundPropChanged())), unboundPropConnections);
@@ -134,7 +135,6 @@ protected:
if (signal.name() == "scriptBindingPropChanged") scriptBindingPropConnections--;
if (signal.name() == "boundSignal") boundSignalConnections--;
if (signal.name() == "unusedSignal") unusedSignalConnections--;
- verifyReceiverCount();
//qDebug() << Q_FUNC_INFO << this << signal.methodSignature();
}
@@ -205,6 +205,7 @@ void tst_qqmlnotifier::createObjects()
exportedClass = qobject_cast<ExportedClass *>(
root->findChild<ExportedClass*>("exportedClass"));
QVERIFY(exportedClass != 0);
+ exportedClass->verifyReceiverCount();
}
void tst_qqmlnotifier::cleanupTestCase()