summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-08 02:28:32 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-08 02:32:41 (GMT)
commit4ffb2a7a27ef5f06672e5f668e46d1657fa3e7ca (patch)
treefae95703c8451d7674c735ba926aec151fabaa8e /src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
parent23440d84ddf78755e77cea75956cd7445647230a (diff)
downloadQt-4ffb2a7a27ef5f06672e5f668e46d1657fa3e7ca.zip
Qt-4ffb2a7a27ef5f06672e5f668e46d1657fa3e7ca.tar.gz
Qt-4ffb2a7a27ef5f06672e5f668e46d1657fa3e7ca.tar.bz2
Optimize Rectangle, Image, and Text creation.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativerectangle_p_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p_p.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
index b87c57f..6bae219 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
@@ -67,6 +67,7 @@ public:
QDeclarativeRectanglePrivate() :
color(Qt::white), gradient(0), pen(0), radius(0), paintmargin(0)
{
+ QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
}
~QDeclarativeRectanglePrivate()
@@ -74,13 +75,13 @@ public:
delete pen;
}
- void init()
- {
- }
-
- QColor getColor();
QColor color;
QDeclarativeGradient *gradient;
+ QDeclarativePen *pen;
+ qreal radius;
+ qreal paintmargin;
+ QPixmap rectImage;
+
QDeclarativePen *getPen() {
if (!pen) {
Q_Q(QDeclarativeRectangle);
@@ -89,10 +90,6 @@ public:
}
return pen;
}
- QDeclarativePen *pen;
- qreal radius;
- qreal paintmargin;
- QPixmap rectImage;
void setPaintMargin(qreal margin)
{