~mterry/unity8/lockscreen-autopilot

« back to all changes in this revision

Viewing changes to tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp

  • Committer: Michael Terry
  • Date: 2013-07-29 19:52:40 UTC
  • mfrom: (138.2.5 trunk)
  • Revision ID: michael.terry@canonical.com-20130729195240-c8rseanxmff1lmw2
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <QtTestGui>
23
23
#pragma GCC diagnostic push
24
24
#pragma GCC diagnostic ignored "-pedantic"
 
25
#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
25
26
#include <private/qquicklistmodel_p.h>
 
27
#else
 
28
#include <private/qqmllistmodel_p.h>
 
29
#endif
26
30
#include <private/qquickanimation_p.h>
27
31
#include <private/qquickitem_p.h>
28
32
#pragma GCC diagnostic pop
124
128
        view->engine()->addImportPath(BUILT_PLUGINS_DIR);
125
129
        view->setSource(QUrl::fromLocalFile(LISTVIEWWITHPAGEHEADER_FOLDER "/test_section.qml"));
126
130
        lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
 
131
#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
127
132
        model = view->rootObject()->findChild<QQuickListModel*>();
 
133
#else
 
134
        model = view->rootObject()->findChild<QQmlListModel*>();
 
135
#endif
128
136
        otherDelegate = view->rootObject()->findChild<QQmlComponent*>();
129
137
        QVERIFY(lvwph);
130
138
        QVERIFY(model);
1637
1645
private:
1638
1646
    QQuickView *view;
1639
1647
    ListViewWithPageHeader *lvwph;
 
1648
#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
1640
1649
    QQuickListModel *model;
 
1650
#else
 
1651
    QQmlListModel *model;
 
1652
#endif
1641
1653
    QQmlComponent *otherDelegate;
1642
1654
};
1643
1655