on xenial help sign in
Explain the weird construct
commit5c284885f8272752f7ad563ee6f4dc79c3b38199 authorAlbert Astals <albert.astals@canonical.com> dateFri 7 Jun 2013, 17:01 (13 years ago) parent23c75e8
1 file changed+4
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+4
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+4
@@ -38,6 +38,10 @@ private Q_SLOTS:
3838 view = new QQuickView();
3939 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
4040 view->setSource(QUrl::fromLocalFile(LISTVIEWWITHPAGEHEADER_FOLDER "/test.qml"));
41+ // This originally was
42+ // lvwph = view->rootObject()->findChild<ListViewWithPageHeader*>();
43+ // but here doesn't work because of the way we are linking listviewwithpageheader.cpp
44+ // doesn't create the moc so doesn't get the Q_OBJECT macro info
4145 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
4246 model = view->rootObject()->findChild<QQuickListModel*>();
4347 otherDelegate = view->rootObject()->findChild<QQmlComponent*>();