diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:05:16 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:05:16 (GMT) |
commit | b437255afe8348d0e5b865bd28cbf0500b3750f7 (patch) | |
tree | 76e31711c342d3176e5a26813937177bd4318b2d /tests/auto/declarative | |
parent | 17d0ed5af4922645a268b6550742fb521d459c8e (diff) | |
parent | 778e902e675a4fb2680012f9bf1221abd3b13981 (diff) | |
download | Qt-b437255afe8348d0e5b865bd28cbf0500b3750f7.zip Qt-b437255afe8348d0e5b865bd28cbf0500b3750f7.tar.gz Qt-b437255afe8348d0e5b865bd28cbf0500b3750f7.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/qmlgraphicsgridview/tst_qmlgraphicsgridview.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/declarative/qmlgraphicsgridview/tst_qmlgraphicsgridview.cpp b/tests/auto/declarative/qmlgraphicsgridview/tst_qmlgraphicsgridview.cpp index b28d805..f389d2c 100644 --- a/tests/auto/declarative/qmlgraphicsgridview/tst_qmlgraphicsgridview.cpp +++ b/tests/auto/declarative/qmlgraphicsgridview/tst_qmlgraphicsgridview.cpp @@ -729,7 +729,7 @@ void tst_QmlGraphicsGridView::changeFlow() // Confirm items positioned correctly and indexes correct int itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count(); - for (int i = 3; i < model.count() && i < itemCount; ++i) { + for (int i = 0; i < model.count() && i < itemCount; ++i) { QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QVERIFY(item); @@ -748,7 +748,7 @@ void tst_QmlGraphicsGridView::changeFlow() // Confirm items positioned correctly and indexes correct itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count(); - for (int i = 3; i < model.count() && i < itemCount; ++i) { + for (int i = 0; i < model.count() && i < itemCount; ++i) { QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QVERIFY(item); @@ -952,13 +952,15 @@ QList<T*> tst_QmlGraphicsGridView::findItems(QmlGraphicsItem *parent, const QStr QList<T*> items; const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->QGraphicsObject::children().count() << "children"; - for (int i = 0; i < parent->QGraphicsObject::children().count(); ++i) { - QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(parent->QGraphicsObject::children().at(i)); + for (int i = 0; i < parent->childItems().count(); ++i) { + QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(parent->childItems().at(i)); if(!item) continue; //qDebug() << "try" << item; - if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) + if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { items.append(static_cast<T*>(item)); + //qDebug() << " found:" << item; + } items += findItems<T>(item, objectName); } |