summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
index 60a4e3147d..fb99ed1880 100644
--- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
+++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
@@ -111,6 +111,8 @@ private slots:
void uninstalledBindingDoesNotEvaluate();
void notify();
+
+ void bindableInterfaceOfCompatPropertyUsesSetter();
};
void tst_QProperty::functorBinding()
@@ -1836,6 +1838,15 @@ void tst_QProperty::notify()
QCOMPARE(recordedValues.at(1), 2);
}
+void tst_QProperty::bindableInterfaceOfCompatPropertyUsesSetter()
+{
+ MyQObject obj;
+ QBindable<int> bindable = obj.bindableCompat();
+ QCOMPARE(obj.setCompatCalled, 0);
+ bindable.setValue(42);
+ QCOMPARE(obj.setCompatCalled, 1);
+}
+
QTEST_MAIN(tst_QProperty);
#undef QT_SOURCE_LOCATION_NAMESPACE