aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrectangle_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-06-01 13:16:28 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-06-01 11:34:15 +0000
commit651a4f7e094f844cac3740744d148102bbf7689f (patch)
tree07b423230120d5dd3c0292e4b5efe05c4ed11ef9 /src/quick/items/qquickrectangle_p.h
parentc158ca8be49a75026e83751dfd825c5bdd63189a (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.h')
-rw-r--r--src/quick/items/qquickrectangle_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index 627f778e44..724a06013c 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -129,6 +129,9 @@ public:
QGradientStops gradientStops() const;
+Q_SIGNALS:
+ void updated();
+
private:
void doUpdate();
@@ -169,6 +172,9 @@ Q_SIGNALS:
protected:
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+private Q_SLOTS:
+ void doUpdate();
+
private:
Q_DISABLE_COPY(QQuickRectangle)
Q_DECLARE_PRIVATE(QQuickRectangle)