summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-02 03:22:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-02 03:22:46 (GMT)
commita7b0abc8eaf39f7773dc7662120b3eda476e9828 (patch)
tree2147549b11ce17592567495a1aefa84008a20b9f
parent49187bc691e67dca741d300e95d5fcde146d5118 (diff)
parent03ff62841c5dae85fde40982a65980a91c5f3109 (diff)
downloadQt-a7b0abc8eaf39f7773dc7662120b3eda476e9828.zip
Qt-a7b0abc8eaf39f7773dc7662120b3eda476e9828.tar.gz
Qt-a7b0abc8eaf39f7773dc7662120b3eda476e9828.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Rectangle should not paint with negative width or height
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index dedb3f7..59d1a84 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -470,6 +470,8 @@ void QDeclarativeRectangle::generateBorderedRect()
void QDeclarativeRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_D(QDeclarativeRectangle);
+ if (width() <= 0 || height() <= 0)
+ return;
if (d->radius > 0 || (d->pen && d->pen->isValid())
|| (d->gradient && d->gradient->gradient()) ) {
drawRect(*p);