aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpositioners
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-05-25 12:32:28 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-28 05:30:34 +0200
commitd4dad3a0b83c921ed4d746eb9694be8b008bcc1a (patch)
treef991d840d10a390d7937ae9769505bf45d1fe2c9 /tests/auto/quick/qquickpositioners
parent45931aac0cc9e251923453b980d6466028e908eb (diff)
Don't parent (QObject) delegate items to views.
This keeps object ownership within the context the items were created in and simplifies lifetime management as the VisualDataModel has sole license to delete objects and doesn't have to keep guards against a view and all it's children being deleted. Delegates are still reparented in the item heirarchy. Change-Id: Ife5afdfe294a5a8ca1ca3638a086f72452e4915c Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickpositioners')
-rw-r--r--tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
index ee0988f107..920db000ab 100644
--- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
+++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
@@ -1480,13 +1480,13 @@ void tst_qquickpositioners::test_repeater()
{
QQuickView *canvas = createView(testFile("repeatertest.qml"));
- QQuickRectangle *one = canvas->rootObject()->findChild<QQuickRectangle*>("one");
+ QQuickRectangle *one = findItem<QQuickRectangle>(canvas->rootItem(), "one");
QVERIFY(one != 0);
- QQuickRectangle *two = canvas->rootObject()->findChild<QQuickRectangle*>("two");
+ QQuickRectangle *two = findItem<QQuickRectangle>(canvas->rootItem(), "two");
QVERIFY(two != 0);
- QQuickRectangle *three = canvas->rootObject()->findChild<QQuickRectangle*>("three");
+ QQuickRectangle *three = findItem<QQuickRectangle>(canvas->rootItem(), "three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);