summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-04-30 08:34:42 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-06-25 14:11:56 +0200
commitb20c7df63aec36cb3cb871e4b898b0e684dcb59a (patch)
tree9c2e2dc72ef823d4e92f3ed2cf043ac68d03baf5 /tests
parente18a060c034beec6c7f4a22044255d9fb55d091a (diff)
Remove QPropertyMemberChangeHandler again
Adding support for a static notifier within QProperty itself - through a QProperty "sister" class - is more efficient in terms of memory consumption and run-time performance. The MemberChangeHandler permanently takes up at least three pointers, while the notified properties only cost one pointer in the binding. Change-Id: Ia1a8c2b66f1f3c2fe13ae0ad9f12cdb6bdcc35ef Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
index 53d361ca26..cafc193257 100644
--- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
+++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
@@ -67,7 +67,6 @@ private slots:
void settingPropertyValueDoesRemoveBinding();
void genericPropertyBinding();
void genericPropertyBindingBool();
- void staticChangeHandler();
void setBindingFunctor();
void multipleObservers();
void propertyAlias();
@@ -661,25 +660,6 @@ void tst_QProperty::genericPropertyBindingBool()
QVERIFY(property.value());
}
-struct ItemType
-{
- QProperty<int> x;
- QVector<int> observedValues;
- void xChanged() {
- observedValues << x.value();
- }
- QPropertyMemberChangeHandler<&ItemType::x, &ItemType::xChanged> test{this};
-};
-
-void tst_QProperty::staticChangeHandler()
-{
- ItemType t;
- t.x = 42;
- t.x = 100;
- QVector<int> values{42, 100};
- QCOMPARE(t.observedValues, values);
-}
-
void tst_QProperty::setBindingFunctor()
{
QProperty<int> property;