summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ham <christopher.ham@nokia.com>2010-12-10 03:03:59 (GMT)
committerChristopher Ham <christopher.ham@nokia.com>2010-12-10 03:09:51 (GMT)
commita32728ce8cf4fa1d1dc1001b1fadc66e9c86e025 (patch)
treea03e9e87e5dd21ec455adf3943d9b739ac86401f
parentf2eca0c0380a0e06ccc7f98c8d112549ac9fa085 (diff)
downloadQt-a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025.zip
Qt-a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025.tar.gz
Qt-a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025.tar.bz2
The sourceSize property for borderImage should be read only
Trying the sourceSize property from QML should emit a read-only warning. Task-number: QTBUG-15703 Reviewed-by: Bea Lam
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index a25074a..d9ba2bd 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -256,12 +256,6 @@ void QDeclarativeBorderImage::setSource(const QUrl &url)
load();
}
-void QDeclarativeBorderImage::setSourceSize(const QSize& size)
-{
- Q_UNUSED(size);
- qmlInfo(this) << "Setting sourceSize for borderImage not supported";
-}
-
void QDeclarativeBorderImage::load()
{
Q_D(QDeclarativeBorderImage);
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
index 7cf24f2..d9db0ac 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -63,6 +63,9 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase
Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
+ // read-only for BorderImage
+ Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
+
public:
QDeclarativeBorderImage(QDeclarativeItem *parent=0);
~QDeclarativeBorderImage();
@@ -80,11 +83,10 @@ public:
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
void setSource(const QUrl &url);
- void setSourceSize(const QSize&);
-
Q_SIGNALS:
void horizontalTileModeChanged();
void verticalTileModeChanged();
+ void sourceSizeChanged();
protected:
virtual void load();