aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/qproperty_decorator.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-09-28 15:38:24 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-12 16:56:51 +0200
commitd3883e9186892e673e8a66ad6651409d5eaf7cf3 (patch)
tree447c9927a19bb827caebbc03cffa49af86d43bc8 /sources/pyside2/tests/QtCore/qproperty_decorator.py
parent8847a47aad95d7f85d5e184071bf95c44826c4c7 (diff)
Update QtCore.Property to the current standard
WAS: Feature-select: Use QtCore.Property instead of Python's property When successfully trying to use QtCore.Property for feature-select's property, I suddenly realized that the implementation only works with QtCore derived classes. This is the reworked version of Property that behaves correctly. The exhaustive Python test was adapted and is used to check the full compatibility of this implementation. In a later update, this implementation might be changed to no longer be restricted to QObject. Change-Id: If87b7b633a2c45e23a15c4d956f63e21d33af3dd Task-number: PYSIDE-1402 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests/QtCore/qproperty_decorator.py')
-rw-r--r--sources/pyside2/tests/QtCore/qproperty_decorator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/pyside2/tests/QtCore/qproperty_decorator.py b/sources/pyside2/tests/QtCore/qproperty_decorator.py
index aa31e59c4..c845ac6d3 100644
--- a/sources/pyside2/tests/QtCore/qproperty_decorator.py
+++ b/sources/pyside2/tests/QtCore/qproperty_decorator.py
@@ -47,7 +47,9 @@ class MyObject(QObject):
return self._value
@value.setter
- def valueSet(self, value):
+ # Note: The name of property and setter must be the same, because the
+ # object changes its identity all the time. `valueSet` no longer works.
+ def value(self, value):
self._value = value