summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-19 15:18:12 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-19 16:29:48 +0200
commit91ab8c173d952e59f45f679a1a27d88b8606afd5 (patch)
treed930a21f909437650b9ecacadecd188d3f683810 /tests/auto/corelib
parent05078459de5dae65b9bb7cf2a1bc216528291648 (diff)
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/corelib')
-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 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()