~ci-train-bot/unity8/unity8-ubuntu-zesty-2404

« back to all changes in this revision

Viewing changes to tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp

  • Committer: Nick Dedekind
  • Date: 2016-11-28 13:46:55 UTC
  • mfrom: (2704 unity8)
  • mto: This revision was merged to the branch mainline in revision 2752.
  • Revision ID: nick.dedekind@canonical.com-20161128134655-vd70a64pbci1b4oc
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        QCOMPARE(section(lvwph->m_visibleItems[visibleIndex]->sectionItem()), sectionHeader);
83
83
        if (!sectionHeader.isNull()) {
84
84
            QCOMPARE(QQuickItemPrivate::get(lvwph->m_visibleItems[visibleIndex]->sectionItem())->culled, sectionHeaderCulled);
85
 
            QCOMPARE(sectionDelegateIndex(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_firstVisibleIndex + visibleIndex);
 
85
            QCOMPARE(sectionDelegate(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_visibleItems[visibleIndex]->m_item);
86
86
        }
87
87
    }
88
88
 
151
151
        return item ? item->property("text").toString() : QString();
152
152
    }
153
153
 
154
 
    int sectionDelegateIndex(QQuickItem *item)
 
154
    QQuickItem *sectionDelegate(QQuickItem *item)
155
155
    {
156
 
        return item ? item->property("delegateIndex").toInt() : -1;
 
156
        return item ? item->property("delegate").value<QQuickItem *>() : nullptr;
157
157
    }
158
158
 
159
159
private Q_SLOTS: