summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:05:17 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:43:43 (GMT)
commite4d6cfb1be4a3ff71013362f1f827e3920524934 (patch)
treecfbabda16e4e314ebb2e2400e77c4407edbc5f98 /tests
parent31fa814955cd2b0983b42543e133f24e9830c67f (diff)
downloadQt-e4d6cfb1be4a3ff71013362f1f827e3920524934.zip
Qt-e4d6cfb1be4a3ff71013362f1f827e3920524934.tar.gz
Qt-e4d6cfb1be4a3ff71013362f1f827e3920524934.tar.bz2
Ensure we use the correct static paintedItems list.
Fixes the zValue autotest, which regressed when the member list was added.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 621f2bf..af34fe5 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -1798,15 +1798,15 @@ void tst_QGraphicsItem::setMatrix()
QCOMPARE(rlist.at(2), unrotatedRect); // From post-update (update current state)
}
-static QList<QGraphicsItem *> paintedItems;
+static QList<QGraphicsItem *> _paintedItems;
class PainterItem : public QGraphicsItem
{
protected:
QRectF boundingRect() const
{ return QRectF(-10, -10, 20, 20); }
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
- { paintedItems << this; }
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ { _paintedItems << this; painter->fillRect(boundingRect(), Qt::red); }
};
void tst_QGraphicsItem::zValue()
@@ -1838,10 +1838,10 @@ void tst_QGraphicsItem::zValue()
QApplication::sendPostedEvents(); //glib workaround
#endif
- QVERIFY(!paintedItems.isEmpty());
- QVERIFY((paintedItems.size() % 4) == 0);
+ QVERIFY(!_paintedItems.isEmpty());
+ QVERIFY((_paintedItems.size() % 4) == 0);
for (int i = 0; i < 3; ++i)
- QVERIFY(paintedItems.at(i)->zValue() < paintedItems.at(i + 1)->zValue());
+ QVERIFY(_paintedItems.at(i)->zValue() < _paintedItems.at(i + 1)->zValue());
}
void tst_QGraphicsItem::shape()