diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp index 7de6458406..3b656dae25 100644 --- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp +++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp @@ -1140,6 +1140,15 @@ void tst_QProperty::testNewStuff() QCOMPARE(object.bindableFoo().value(), 111); object.bindableFoo().setValue(24); QCOMPARE(object.foo(), 24); + + auto isCurrentlyEvaluatingBinding = []() { + return QtPrivate::isAnyBindingEvaluating(); + }; + QVERIFY(!isCurrentlyEvaluatingBinding()); + QProperty<bool> evaluationDetector {false}; + evaluationDetector.setBinding(isCurrentlyEvaluatingBinding); + QVERIFY(evaluationDetector.value()); + QVERIFY(!isCurrentlyEvaluatingBinding()); } void tst_QProperty::qobjectObservers() |