summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-06-17 06:50:10 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-06-17 06:51:40 (GMT)
commitf0c02624791441d45cc8b2f084505cfc5add7237 (patch)
tree623986609c20c4370dd62b5ad277dbfaa01036c5 /src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
parentd2c04d76fc26300a33842a2ef52613f189a07c3c (diff)
downloadQt-f0c02624791441d45cc8b2f084505cfc5add7237.zip
Qt-f0c02624791441d45cc8b2f084505cfc5add7237.tar.gz
Qt-f0c02624791441d45cc8b2f084505cfc5add7237.tar.bz2
BorderImage is not updated when border values change
Task-number: QTBUG-11509 Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
index 3535109..01e4a00 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
@@ -77,11 +77,20 @@ public:
{
}
+
QDeclarativeScaleGrid *getScaleGrid()
{
Q_Q(QDeclarativeBorderImage);
- if (!border)
+ if (!border) {
border = new QDeclarativeScaleGrid(q);
+ static int borderChangedSignalIdx = -1;
+ static int doUpdateSlotIdx = -1;
+ if (borderChangedSignalIdx < 0)
+ borderChangedSignalIdx = QDeclarativeScaleGrid::staticMetaObject.indexOfSignal("borderChanged()");
+ if (doUpdateSlotIdx < 0)
+ doUpdateSlotIdx = QDeclarativeBorderImage::staticMetaObject.indexOfSlot("doUpdate()");
+ QMetaObject::connect(border, borderChangedSignalIdx, q, doUpdateSlotIdx);
+ }
return border;
}