From 91ab8c173d952e59f45f679a1a27d88b8606afd5 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 19 Oct 2020 15:18:12 +0200 Subject: QProperty: Add value() and setValue() to QBindable This simplifies code that would otherwise need to use the setter and getter in addition to the bindable. Change-Id: Iec6510b4f578f5b223c63b3a0719257a0cf2463d Reviewed-by: Fabian Kosmale --- tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp index 55ef3b12cb..21e0955ba5 100644 --- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp +++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp @@ -1088,6 +1088,9 @@ void tst_QProperty::testNewStuff() object.readData.setValue(111); QCOMPARE(object.computed(), 111); + QCOMPARE(object.bindableFoo().value(), 111); + object.bindableFoo().setValue(24); + QCOMPARE(object.foo(), 24); } void tst_QProperty::qobjectObservers() -- cgit v1.2.3