summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2023-03-09 10:32:36 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2023-03-09 16:24:45 +0100
commit17c9001a53a2377cc38bdf4b1982cab2dca94573 (patch)
tree298daebd27983770aa644301ebebd4e4554cb718 /tests/auto/corelib/kernel
parentbbb9cf225fd030a87818cb867c24ab651f797100 (diff)
Fix QPropertyAlias::addNotifier
QPropertyAlias might be deprecated, but using it should still not fail to compile. Pick-to: 6.5 Fixes: QTBUG-111735 Change-Id: I486cddb424b60cd3e5c539e26afca3726e29bb09 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel')
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
index 8e9192c27e..0694ccde00 100644
--- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
+++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
@@ -2296,7 +2296,10 @@ void tst_QProperty::qpropertyAlias()
alias.setValue(42);
QCOMPARE(i->value(), 42);
QProperty<int> j;
+ bool notifierCalled = false;
+ auto myNotifier = alias.addNotifier([&](){notifierCalled = true;});
i->setBinding([&]() -> int { return j; });
+ QVERIFY(notifierCalled);
j.setValue(42);
QCOMPARE(alias.value(), 42);
i.reset();