aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/common
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-03-24 21:03:05 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-04-03 07:04:26 +0200
commit36fc392147ea79bb665058ea165c86f6cd6680d7 (patch)
treed95cb07098a6bf41111ea95b96c5a0fc65eba6a4 /src/qml/common
parente40098c5303e7af4b12c64093b120405c63fdf8d (diff)
Implement support for property observers
Syntactically we call them signal handler expressions :-), now also working when the underlying property doesn't emit an old-style signal but is just a QProperty. Change-Id: I719a3e428f44af0fd48036434aefa682a02f7de1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/common')
-rw-r--r--src/qml/common/qv4compileddata_p.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h
index 7d6ef14854..f0c4c2aa3e 100644
--- a/src/qml/common/qv4compileddata_p.h
+++ b/src/qml/common/qv4compileddata_p.h
@@ -449,7 +449,8 @@ struct Binding
IsBindingToAlias = 0x40,
IsDeferredBinding = 0x80,
IsCustomParserBinding = 0x100,
- IsFunctionExpression = 0x200
+ IsFunctionExpression = 0x200,
+ IsPropertyObserver = 0x400
};
union {
@@ -475,7 +476,8 @@ struct Binding
|| type == Type_GroupProperty)
return false;
if (flags & IsSignalHandlerExpression
- || flags & IsSignalHandlerObject)
+ || flags & IsSignalHandlerObject
+ || flags & IsPropertyObserver)
return false;
return true;
}
@@ -485,7 +487,7 @@ struct Binding
bool isSignalHandler() const
{
- if (flags & IsSignalHandlerExpression || flags & IsSignalHandlerObject) {
+ if (flags & IsSignalHandlerExpression || flags & IsSignalHandlerObject || flags & IsPropertyObserver) {
Q_ASSERT(!isValueBinding());
Q_ASSERT(!isAttachedProperty());
Q_ASSERT(!isGroupProperty());