diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-06-01 13:16:28 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-06-01 11:34:15 +0000 |
commit | 651a4f7e094f844cac3740744d148102bbf7689f (patch) | |
tree | 07b423230120d5dd3c0292e4b5efe05c4ed11ef9 /src/quick/items/qquickrectangle_p_p.h | |
parent | c158ca8be49a75026e83751dfd825c5bdd63189a (diff) |
Revert "QQuickRectangle: Optimize setGradient"
This reverts commit 9709d04ba7787c853a1ddbeed0347eab27c0924f.
We changed this from using a signal for notification to using parenting. But
this cannot be done for two related reasons: the first:
QtObject {
property Gradient someGradient: Gradient {
id: someGradient
}
}
...
Rectangle {
gradient: someGradient
}
... should work, and no longer did, because the Gradient's parent was
the QtObject, not the Rectangle it was tied to. And secondly:
Rectangle {
id: rectOne
gradient: Gradient {
id: someGradient
}
}
Rectangle {
id: rectTwo
gradient: someGradient
}
... also didn't work anymore, as the Gradient was only notifying a
single Item about changes to it.
The easiest way to fix this is to just revert back to using a signal
connection.
This also caused problems in qtquickcontrols autotests.
Change-Id: Ic07dd02e9920596d0c047bfc23995b3be8c96c49
Task-number: QTBUG-60268
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quick/items/qquickrectangle_p_p.h')
-rw-r--r-- | src/quick/items/qquickrectangle_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickrectangle_p_p.h b/src/quick/items/qquickrectangle_p_p.h index e771beec87..3c1aaf7661 100644 --- a/src/quick/items/qquickrectangle_p_p.h +++ b/src/quick/items/qquickrectangle_p_p.h @@ -76,6 +76,7 @@ public: QQuickGradient *gradient; QQuickPen *pen; qreal radius; + static int doUpdateSlotIdx; }; QT_END_NAMESPACE |