diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-09 10:32:36 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-09 16:24:45 +0100 |
commit | 17c9001a53a2377cc38bdf4b1982cab2dca94573 (patch) | |
tree | 298daebd27983770aa644301ebebd4e4554cb718 /tests/auto/corelib/kernel | |
parent | bbb9cf225fd030a87818cb867c24ab651f797100 (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.cpp | 3 |
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(); |