OpenCoverage

qquicklistview.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicklistview.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11class FxListItemSG;-
12-
13class QQuickListViewPrivate : public QQuickItemViewPrivate-
14{-
15 inline QQuickListView* q_func() { return static_cast<QQuickListView *>(q_ptr); } inline const QQuickListView* q_func() const { return static_cast<const QQuickListView *>(q_ptr); } friend class QQuickListView;-
16public:-
17 static QQuickListViewPrivate* get(QQuickListView *item) { return
executed 46 times by 4 tests: return item->d_func();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
item->d_func();
executed 46 times by 4 tests: return item->d_func();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
46
18-
19 Qt::Orientation layoutOrientation() const override;-
20 bool isContentFlowReversed() const override;-
21 bool isRightToLeft() const;-
22 bool isBottomToTop() const;-
23-
24 qreal positionAt(int index) const override;-
25 qreal endPositionAt(int index) const override;-
26 qreal originPosition() const override;-
27 qreal lastPosition() const override;-
28-
29 FxViewItem *itemBefore(int modelIndex) const;-
30 QString sectionAt(int modelIndex);-
31 qreal snapPosAt(qreal pos);-
32 FxViewItem *snapItemAt(qreal pos);-
33-
34 void init() override;-
35 void clear() override;-
36-
37 bool addVisibleItems(qreal fillFrom, qreal fillTo, qreal bufferFrom, qreal bufferTo, bool doBuffer) override;-
38 bool removeNonVisibleItems(qreal bufferFrom, qreal bufferTo) override;-
39 void visibleItemsChanged() override;-
40-
41 void removeItem(FxViewItem *item);-
42-
43 FxViewItem *newViewItem(int index, QQuickItem *item) override;-
44 void initializeViewItem(FxViewItem *item) override;-
45 bool releaseItem(FxViewItem *item) override;-
46 void repositionItemAt(FxViewItem *item, int index, qreal sizeBuffer) override;-
47 void repositionPackageItemAt(QQuickItem *item, int index) override;-
48 void resetFirstItemPosition(qreal pos = 0.0) override;-
49 void adjustFirstItem(qreal forwards, qreal backwards, int) override;-
50 void updateSizeChangesBeforeVisiblePos(FxViewItem *item, ChangeResult *removeResult) override;-
51-
52 void createHighlight() override;-
53 void updateHighlight() override;-
54 void resetHighlightPosition() override;-
55 bool movingFromHighlight() override;-
56-
57 void setPosition(qreal pos) override;-
58 void layoutVisibleItems(int fromModelIndex = 0) override;-
59-
60 bool applyInsertionChange(const QQmlChangeSet::Change &insert, ChangeResult *changeResult, QList<FxViewItem *> *addedItems, QList<MovedItem> *movingIntoView) override;-
61 void translateAndTransitionItemsAfter(int afterIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult) override;-
62-
63 void updateSectionCriteria() override;-
64 void updateSections() override;-
65 QQuickItem *getSectionItem(const QString &section);-
66 void releaseSectionItem(QQuickItem *item);-
67 void releaseSectionItems();-
68 void updateInlineSection(FxListItemSG *);-
69 void updateCurrentSection();-
70 void updateStickySections();-
71-
72 qreal headerSize() const override;-
73 qreal footerSize() const override;-
74 bool showHeaderForIndex(int index) const override;-
75 bool showFooterForIndex(int index) const override;-
76 void updateHeader() override;-
77 void updateFooter() override;-
78 bool hasStickyHeader() const override;-
79 bool hasStickyFooter() const override;-
80-
81 void changedVisibleIndex(int newIndex) override;-
82 void initializeCurrentItem() override;-
83-
84 void updateAverage();-
85-
86 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;-
87 void fixupPosition() override;-
88 void fixup(AxisData &data, qreal minExtent, qreal maxExtent) override;-
89 bool flick(QQuickItemViewPrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,-
90 QQuickTimeLineCallback::Callback fixupCallback, qreal velocity) override;-
91-
92 QQuickListView::Orientation orient;-
93 qreal visiblePos;-
94 qreal averageSize;-
95 qreal spacing;-
96 QQuickListView::SnapMode snapMode;-
97-
98 QQuickListView::HeaderPositioning headerPositioning;-
99 QQuickListView::FooterPositioning footerPositioning;-
100-
101 QSmoothedAnimation *highlightPosAnimator;-
102 QSmoothedAnimation *highlightWidthAnimator;-
103 QSmoothedAnimation *highlightHeightAnimator;-
104 qreal highlightMoveVelocity;-
105 qreal highlightResizeVelocity;-
106 int highlightResizeDuration;-
107-
108 QQuickViewSection *sectionCriteria;-
109 QString currentSection;-
110 static const int sectionCacheSize = 5;-
111 QQuickItem *sectionCache[sectionCacheSize];-
112 QQuickItem *currentSectionItem;-
113 QString currentStickySection;-
114 QQuickItem *nextSectionItem;-
115 QString nextStickySection;-
116 QString lastVisibleSection;-
117 QString nextSection;-
118-
119 qreal overshootDist;-
120 bool correctFlick : 1;-
121 bool inFlickCorrection : 1;-
122-
123 QQuickListViewPrivate()-
124 : orient(QQuickListView::Vertical)-
125 , visiblePos(0)-
126 , averageSize(100.0), spacing(0.0)-
127 , snapMode(QQuickListView::NoSnap)-
128 , headerPositioning(QQuickListView::InlineHeader)-
129 , footerPositioning(QQuickListView::InlineFooter)-
130 , highlightPosAnimator(nullptr), highlightWidthAnimator(nullptr), highlightHeightAnimator(nullptr)-
131 , highlightMoveVelocity(400), highlightResizeVelocity(400), highlightResizeDuration(-1)-
132 , sectionCriteria(nullptr), currentSectionItem(nullptr), nextSectionItem(nullptr)-
133 , overshootDist(0.0), correctFlick(false), inFlickCorrection(false)-
134 {-
135 highlightMoveDuration = -1;-
136 }
executed 1920 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1920
137 ~QQuickListViewPrivate() {-
138 delete highlightPosAnimator;-
139 delete highlightWidthAnimator;-
140 delete highlightHeightAnimator;-
141 }
executed 1912 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1912
142-
143 friend class QQuickViewSection;-
144};-
145-
146-
147-
148QQuickViewSection::QQuickViewSection(QQuickListView *parent)-
149 : QObject(parent), m_criteria(FullString), m_delegate(nullptr), m_labelPositioning(InlineLabels)-
150 , m_view(parent ? QQuickListViewPrivate::get(parent) : nullptr)-
151{-
152}
executed 46 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
46
153-
154void QQuickViewSection::setProperty(const QString &property)-
155{-
156 if (property != m_property
property != m_propertyDescription
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-58
157 m_property = property;-
158 propertyChanged();-
159-
160 m_view->updateSectionCriteria();-
161 }
executed 58 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
58
162}
executed 58 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
58
163-
164void QQuickViewSection::setCriteria(QQuickViewSection::SectionCriteria criteria)-
165{-
166 if (criteria != m_criteria
criteria != m_criteriaDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
2-8
167 m_criteria = criteria;-
168 criteriaChanged();-
169-
170 m_view->updateSectionCriteria();-
171 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
172}
executed 10 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
10
173-
174void QQuickViewSection::setDelegate(QQmlComponent *delegate)-
175{-
176 if (delegate
delegate != m_delegateDescription
TRUEevaluated 42 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
!= m_delegate
delegate != m_delegateDescription
TRUEevaluated 42 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
) {
0-42
177 if (m_delegate
m_delegateDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
)
2-40
178 m_view->releaseSectionItems();
executed 2 times by 1 test: m_view->releaseSectionItems();
Executed by:
  • tst_qquicklistview
2
179 m_delegate = delegate;-
180 delegateChanged();-
181 m_view->forceLayoutPolish();-
182 }
executed 42 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
42
183}
executed 42 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
42
184-
185QString QQuickViewSection::sectionString(const QString &value)-
186{-
187 if (m_criteria == FirstCharacter
m_criteria == FirstCharacterDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 7392 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
12-7392
188 return
executed 12 times by 1 test: return value.isEmpty() ? QString() : value.at(0);
Executed by:
  • tst_qquicklistview
value.isEmpty() ? QString() : value.at(0);
executed 12 times by 1 test: return value.isEmpty() ? QString() : value.at(0);
Executed by:
  • tst_qquicklistview
12
189 else-
190 return
executed 7392 times by 4 tests: return value;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
value;
executed 7392 times by 4 tests: return value;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
7392
191}-
192-
193void QQuickViewSection::setLabelPositioning(int l)-
194{-
195 if (m_labelPositioning != l
m_labelPositioning != lDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
8-14
196 m_labelPositioning = l;-
197 labelPositioningChanged();-
198 m_view->forceLayoutPolish();-
199 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
8
200}
executed 22 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
22
201-
202-
203-
204class FxListItemSG : public FxViewItem-
205{-
206public:-
207 FxListItemSG(QQuickItem *i, QQuickListView *v, bool own) : FxViewItem(i, v, own, static_cast<QQuickItemViewAttached*>(qmlAttachedPropertiesObject<QQuickListView>(i))), view(v)-
208 {-
209 }
executed 36217 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
36217
210-
211 inline QQuickItem *section() const {-
212 return
executed 817572 times by 10 tests: return item && attached ? static_cast<QQuickListViewAttached*>(attached)->m_sectionItem : nullptr;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
item && attached ? static_cast<QQuickListViewAttached*>(attached)->m_sectionItem : nullptr;
executed 817572 times by 10 tests: return item && attached ? static_cast<QQuickListViewAttached*>(attached)->m_sectionItem : nullptr;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
817572
213 }-
214 void setSection(QQuickItem *s) {-
215 static_cast<QQuickListViewAttached*>(attached)->m_sectionItem = s;-
216 }
executed 226 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
226
217-
218 qreal position() const override {-
219 if (section()
section()Description
TRUEevaluated 9212 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 284354 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
9212-284354
220 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 9212 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
)
0-9212
221 return
executed 9212 times by 3 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -section()->height()-section()->y() : section()->y());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
(view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -section()->height()-section()->y() : section()->y());
executed 9212 times by 3 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -section()->height()-section()->y() : section()->y());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
9212
222 else-
223 return
never executed: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -section()->width()-section()->x() : section()->x());
(view->effectiveLayoutDirection() == Qt::RightToLeft ? -section()->width()-section()->x() : section()->x());
never executed: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -section()->width()-section()->x() : section()->x());
0
224 } else {-
225 return
executed 284354 times by 10 tests: return itemPosition();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
itemPosition();
executed 284354 times by 10 tests: return itemPosition();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
284354
226 }-
227 }-
228 qreal itemPosition() const {-
229 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 241869 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 58592 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
58592-241869
230 return
executed 241869 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemHeight()-itemY() : itemY());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
(view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemHeight()-itemY() : itemY());
executed 241869 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemHeight()-itemY() : itemY());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
241869
231 else-
232 return
executed 58592 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemWidth()-itemX() : itemX());
Executed by:
  • tst_examples
  • tst_qquicklistview
(view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemWidth()-itemX() : itemX());
executed 58592 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemWidth()-itemX() : itemX());
Executed by:
  • tst_examples
  • tst_qquicklistview
58592
233 }-
234 qreal size() const override {-
235 if (section()
section()Description
TRUEevaluated 5536 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 305361 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
5536-305361
236 return
executed 5536 times by 3 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight()+section()->height() : itemWidth()+section()->width());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
(view->orientation() == QQuickListView::Vertical ? itemHeight()+section()->height() : itemWidth()+section()->width());
executed 5536 times by 3 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight()+section()->height() : itemWidth()+section()->width());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
5536
237 else-
238 return
executed 305361 times by 10 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
(view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
executed 305361 times by 10 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
305361
239 }-
240 qreal itemSize() const {-
241 return
executed 3458 times by 10 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
(view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
executed 3458 times by 10 tests: return (view->orientation() == QQuickListView::Vertical ? itemHeight() : itemWidth());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3458
242 }-
243 qreal sectionSize() const override {-
244 if (section()
section()Description
TRUEevaluated 194 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 13500 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
194-13500
245 return
executed 194 times by 3 tests: return (view->orientation() == QQuickListView::Vertical ? section()->height() : section()->width());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
(view->orientation() == QQuickListView::Vertical ? section()->height() : section()->width());
executed 194 times by 3 tests: return (view->orientation() == QQuickListView::Vertical ? section()->height() : section()->width());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
194
246 return
executed 13500 times by 9 tests: return 0.0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
0.0;
executed 13500 times by 9 tests: return 0.0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
13500
247 }-
248 qreal endPosition() const override {-
249 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 223019 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 48962 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
48962-223019
250 return
executed 223019 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemY() : itemY() + itemHeight());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
(view->verticalLayoutDirection() == QQuickItemView::BottomToTop
executed 223019 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemY() : itemY() + itemHeight());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
223019
251 ? -itemY()
executed 223019 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemY() : itemY() + itemHeight());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
223019
252 : itemY() + itemHeight());
executed 223019 times by 10 tests: return (view->verticalLayoutDirection() == QQuickItemView::BottomToTop ? -itemY() : itemY() + itemHeight());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
223019
253 } else {-
254 return
executed 48962 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemX() : itemX() + itemWidth());
Executed by:
  • tst_examples
  • tst_qquicklistview
(view->effectiveLayoutDirection() == Qt::RightToLeft
executed 48962 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemX() : itemX() + itemWidth());
Executed by:
  • tst_examples
  • tst_qquicklistview
48962
255 ? -itemX()
executed 48962 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemX() : itemX() + itemWidth());
Executed by:
  • tst_examples
  • tst_qquicklistview
48962
256 : itemX() + itemWidth());
executed 48962 times by 2 tests: return (view->effectiveLayoutDirection() == Qt::RightToLeft ? -itemX() : itemX() + itemWidth());
Executed by:
  • tst_examples
  • tst_qquicklistview
48962
257 }-
258 }-
259 void setPosition(qreal pos, bool immediate = false) {-
260-
261 if (section()
section()Description
TRUEevaluated 2669 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 77366 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2669-77366
262 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 2669 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
) {
0-2669
263 if (view->verticalLayoutDirection() == QQuickItemView::BottomToTop
view->vertical...w::BottomToTopDescription
TRUEnever evaluated
FALSEevaluated 2669 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
)
0-2669
264 section()->setY(-section()->height()-pos);
never executed: section()->setY(-section()->height()-pos);
0
265 else-
266 section()->setY(pos);
executed 2669 times by 3 tests: section()->setY(pos);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
2669
267 } else {-
268 if (view->effectiveLayoutDirection() == Qt::RightToLeft
view->effectiv...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
269 section()->setX(-section()->width()-pos);
never executed: section()->setX(-section()->width()-pos);
0
270 else-
271 section()->setX(pos);
never executed: section()->setX(pos);
0
272 }-
273 }-
274 moveTo(pointForPosition(pos), immediate);-
275 }
executed 80035 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
80035
276 void setSize(qreal size) {-
277 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 1984 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 210 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
210-1984
278 item->setHeight(size);
executed 1984 times by 10 tests: item->setHeight(size);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1984
279 else-
280 item->setWidth(size);
executed 210 times by 2 tests: item->setWidth(size);
Executed by:
  • tst_examples
  • tst_qquicklistview
210
281 }-
282 bool contains(qreal x, qreal y) const override {-
283 return
executed 13428 times by 1 test: return (x >= itemX() && x < itemX() + itemWidth() && y >= itemY() && y < itemY() + itemHeight());
Executed by:
  • tst_qquicklistview
(x >= itemX() && x < itemX() + itemWidth() &&
executed 13428 times by 1 test: return (x >= itemX() && x < itemX() + itemWidth() && y >= itemY() && y < itemY() + itemHeight());
Executed by:
  • tst_qquicklistview
13428
284 y >= itemY() && y < itemY() + itemHeight());
executed 13428 times by 1 test: return (x >= itemX() && x < itemX() + itemWidth() && y >= itemY() && y < itemY() + itemHeight());
Executed by:
  • tst_qquicklistview
13428
285 }-
286-
287 QQuickListView *view;-
288-
289private:-
290 QPointF pointForPosition(qreal pos) const {-
291 if (view->orientation() == QQuickListView::Vertical
view->orientat...View::VerticalDescription
TRUEevaluated 74944 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 5091 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
5091-74944
292 if (view->verticalLayoutDirection() == QQuickItemView::BottomToTop
view->vertical...w::BottomToTopDescription
TRUEevaluated 9413 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 65531 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
9413-65531
293 if (section()
section()Description
TRUEnever evaluated
FALSEevaluated 9413 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-9413
294 pos += section()->height();
never executed: pos += section()->height();
0
295 return
executed 9413 times by 1 test: return QPointF(itemX(), -itemHeight() - pos);
Executed by:
  • tst_qquicklistview
QPointF(itemX(), -itemHeight() - pos);
executed 9413 times by 1 test: return QPointF(itemX(), -itemHeight() - pos);
Executed by:
  • tst_qquicklistview
9413
296 } else {-
297 if (section()
section()Description
TRUEevaluated 2669 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 62862 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
2669-62862
298 pos += section()->height();
executed 2669 times by 3 tests: pos += section()->height();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
2669
299 return
executed 65531 times by 10 tests: return QPointF(itemX(), pos);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
QPointF(itemX(), pos);
executed 65531 times by 10 tests: return QPointF(itemX(), pos);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
65531
300 }-
301 } else {-
302 if (view->effectiveLayoutDirection() == Qt::RightToLeft
view->effectiv...t::RightToLeftDescription
TRUEevaluated 1915 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
1915-3176
303 if (section()
section()Description
TRUEnever evaluated
FALSEevaluated 1915 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-1915
304 pos += section()->width();
never executed: pos += section()->width();
0
305 return
executed 1915 times by 1 test: return QPointF(-itemWidth() - pos, itemY());
Executed by:
  • tst_qquicklistview
QPointF(-itemWidth() - pos, itemY());
executed 1915 times by 1 test: return QPointF(-itemWidth() - pos, itemY());
Executed by:
  • tst_qquicklistview
1915
306 } else {-
307 if (section()
section()Description
TRUEnever evaluated
FALSEevaluated 3176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
0-3176
308 pos += section()->width();
never executed: pos += section()->width();
0
309 return
executed 3176 times by 2 tests: return QPointF(pos, itemY());
Executed by:
  • tst_examples
  • tst_qquicklistview
QPointF(pos, itemY());
executed 3176 times by 2 tests: return QPointF(pos, itemY());
Executed by:
  • tst_examples
  • tst_qquicklistview
3176
310 }-
311 }-
312 }-
313};-
314-
315-
316-
317bool QQuickListViewPrivate::isContentFlowReversed() const-
318{-
319 return
executed 231360 times by 11 tests: return isRightToLeft() || isBottomToTop();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
isRightToLeft() || isBottomToTop();
executed 231360 times by 11 tests: return isRightToLeft() || isBottomToTop();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
231360
320}-
321-
322Qt::Orientation QQuickListViewPrivate::layoutOrientation() const-
323{-
324 return
executed 559523 times by 11 tests: return static_cast<Qt::Orientation>(orient);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
static_cast<Qt::Orientation>(orient);
executed 559523 times by 11 tests: return static_cast<Qt::Orientation>(orient);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
559523
325}-
326-
327bool QQuickListViewPrivate::isRightToLeft() const-
328{-
329 const QQuickListView * const q = q_func();-
330 return
executed 239349 times by 11 tests: return orient == QQuickListView::Horizontal && q->effectiveLayoutDirection() == Qt::RightToLeft;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
orient == QQuickListView::Horizontal && q->effectiveLayoutDirection() == Qt::RightToLeft;
executed 239349 times by 11 tests: return orient == QQuickListView::Horizontal && q->effectiveLayoutDirection() == Qt::RightToLeft;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
239349
331}-
332-
333bool QQuickListViewPrivate::isBottomToTop() const-
334{-
335 return
executed 233222 times by 11 tests: return orient == QQuickListView::Vertical && verticalLayoutDirection == QQuickItemView::BottomToTop;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
orient == QQuickListView::Vertical && verticalLayoutDirection == QQuickItemView::BottomToTop;
executed 233222 times by 11 tests: return orient == QQuickListView::Vertical && verticalLayoutDirection == QQuickItemView::BottomToTop;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
233222
336}-
337-
338-
339-
340FxViewItem *QQuickListViewPrivate::itemBefore(int modelIndex) const-
341{-
342 if (modelIndex < visibleIndex
modelIndex < visibleIndexDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 460 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
46-460
343 return
executed 46 times by 1 test: return nullptr;
Executed by:
  • tst_qquicklistview
nullptr;
executed 46 times by 1 test: return nullptr;
Executed by:
  • tst_qquicklistview
46
344 int idx = 1;-
345 int lastIndex = -1;-
346 while (idx < visibleItems.count()
idx < visibleItems.count()Description
TRUEevaluated 3492 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 456 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
456-3492
347 FxViewItem *item = visibleItems.at(idx);-
348 if (item->index != -1
item->index != -1Description
TRUEevaluated 3488 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
4-3488
349 lastIndex = item->index;
executed 3488 times by 3 tests: lastIndex = item->index;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
3488
350 if (item->index == modelIndex
item->index == modelIndexDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3488 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
4-3488
351 return
executed 4 times by 1 test: return visibleItems.at(idx-1);
Executed by:
  • tst_qquicklistview
visibleItems.at(idx-1);
executed 4 times by 1 test: return visibleItems.at(idx-1);
Executed by:
  • tst_qquicklistview
4
352 ++idx;-
353 }
executed 3488 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
3488
354 if (lastIndex == modelIndex-1
lastIndex == modelIndex-1Description
TRUEevaluated 392 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 64 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
64-392
355 return
executed 392 times by 3 tests: return visibleItems.constLast();
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
visibleItems.constLast();
executed 392 times by 3 tests: return visibleItems.constLast();
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
392
356 return
executed 64 times by 3 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
nullptr;
executed 64 times by 3 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
64
357}-
358-
359void QQuickListViewPrivate::setPosition(qreal pos)-
360{-
361 QQuickListView * const q = q_func();-
362 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 5030 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 533 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
533-5030
363 if (isBottomToTop()
isBottomToTop()Description
TRUEevaluated 208 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4822 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
208-4822
364 q->QQuickFlickable::setContentY(-pos-size());
executed 208 times by 1 test: q->QQuickFlickable::setContentY(-pos-size());
Executed by:
  • tst_qquicklistview
208
365 else-
366 q->QQuickFlickable::setContentY(pos);
executed 4822 times by 11 tests: q->QQuickFlickable::setContentY(pos);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4822
367 } else {-
368 if (isRightToLeft()
isRightToLeft()Description
TRUEevaluated 130 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 403 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
130-403
369 q->QQuickFlickable::setContentX(-pos-size());
executed 130 times by 1 test: q->QQuickFlickable::setContentX(-pos-size());
Executed by:
  • tst_qquicklistview
130
370 else-
371 q->QQuickFlickable::setContentX(pos);
executed 403 times by 2 tests: q->QQuickFlickable::setContentX(pos);
Executed by:
  • tst_examples
  • tst_qquicklistview
403
372 }-
373}-
374-
375qreal QQuickListViewPrivate::originPosition() const-
376{-
377 qreal pos = 0;-
378 if (!visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 25232 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 9076 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
9076-25232
379 pos = (*visibleItems.constBegin())->position();-
380 if (visibleIndex > 0
visibleIndex > 0Description
TRUEevaluated 4445 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 20787 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
4445-20787
381 pos -= visibleIndex * (averageSize + spacing);
executed 4445 times by 3 tests: pos -= visibleIndex * (averageSize + spacing);
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
4445
382 }
executed 25232 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
25232
383 return
executed 34308 times by 11 tests: return pos;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
pos;
executed 34308 times by 11 tests: return pos;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
34308
384}-
385-
386qreal QQuickListViewPrivate::lastPosition() const-
387{-
388 qreal pos = 0;-
389 if (!visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 23622 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4366 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
4366-23622
390 int invisibleCount = -
391 (-0x7fffffff - 1)-
392 ;-
393 int delayRemovedCount = 0;-
394 for (int i = visibleItems.count()-1; i >= 0
i >= 0Description
TRUEevaluated 23803 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
; --i) {
15-23803
395 FxViewItem *item = visibleItems.at(i);-
396 if (item->index != -1
item->index != -1Description
TRUEevaluated 23607 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 196 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
196-23607
397-
398 invisibleCount = model->count() - (item->index + 1 + delayRemovedCount);-
399 break;
executed 23607 times by 10 tests: break;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
23607
400 } else if (item->attached->delayRemove()
item->attached->delayRemove()Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-196
401 ++delayRemovedCount;-
402 }
executed 196 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
196
403 }
executed 196 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
196
404 if (invisibleCount ==
invisibleCount...x7fffffff - 1)Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 23607 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
15-23607
405 (-0x7fffffff - 1)
invisibleCount...x7fffffff - 1)Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 23607 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
15-23607
406 ) {-
407-
408 invisibleCount = model->count();-
409 }
executed 15 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
15
410 pos = (*(--visibleItems.constEnd()))->endPosition();-
411 if (invisibleCount > 0
invisibleCount > 0Description
TRUEevaluated 15071 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 8551 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
8551-15071
412 pos += invisibleCount * (averageSize + spacing);
executed 15071 times by 6 tests: pos += invisibleCount * (averageSize + spacing);
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
15071
413 }
executed 23622 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else if (model && model->count()
model->count()Description
TRUEevaluated 4300 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
66-23622
414 pos = (model->count() * averageSize + (model->count()-1) * spacing);-
415 }
executed 4300 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4300
416 return
executed 27988 times by 10 tests: return pos;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
pos;
executed 27988 times by 10 tests: return pos;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
27988
417}-
418-
419qreal QQuickListViewPrivate::positionAt(int modelIndex) const-
420{-
421 if (FxViewItem *item = visibleItem(modelIndex)
FxViewItem *it...em(modelIndex)Description
TRUEevaluated 5319 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 11425 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
5319-11425
422 return
executed 5319 times by 8 tests: return item->position();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
item->position();
executed 5319 times by 8 tests: return item->position();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
5319
423 }-
424 if (!visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 9187 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 2238 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2238-9187
425 if (modelIndex < visibleIndex
modelIndex < visibleIndexDescription
TRUEevaluated 1174 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 8013 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
1174-8013
426 int count = visibleIndex - modelIndex;-
427 qreal cs = 0;-
428 if (modelIndex == currentIndex
modelIndex == currentIndexDescription
TRUEevaluated 1154 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& currentItem
currentItemDescription
TRUEevaluated 1154 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-1154
429 cs = currentItem->size() + spacing;-
430 --count;-
431 }
executed 1154 times by 3 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1154
432 return
executed 1174 times by 3 tests: return (*visibleItems.constBegin())->position() - count * (averageSize + spacing) - cs;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
(*visibleItems.constBegin())->position() - count * (averageSize + spacing) - cs;
executed 1174 times by 3 tests: return (*visibleItems.constBegin())->position() - count * (averageSize + spacing) - cs;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1174
433 } else {-
434 int count = modelIndex - findLastVisibleIndex(visibleIndex) - 1;-
435 return
executed 8013 times by 6 tests: return (*(--visibleItems.constEnd()))->endPosition() + spacing + count * (averageSize + spacing);
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
(*(--visibleItems.constEnd()))->endPosition() + spacing + count * (averageSize + spacing);
executed 8013 times by 6 tests: return (*(--visibleItems.constEnd()))->endPosition() + spacing + count * (averageSize + spacing);
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
8013
436 }-
437 }-
438 return
executed 2238 times by 10 tests: return 0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
0;
executed 2238 times by 10 tests: return 0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2238
439}-
440-
441qreal QQuickListViewPrivate::endPositionAt(int modelIndex) const-
442{-
443 if (FxViewItem *item = visibleItem(modelIndex)
FxViewItem *it...em(modelIndex)Description
TRUEevaluated 9775 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 7739 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
7739-9775
444 return
executed 9775 times by 10 tests: return item->endPosition();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
item->endPosition();
executed 9775 times by 10 tests: return item->endPosition();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
9775
445 if (!visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 1431 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 6308 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
1431-6308
446 if (modelIndex < visibleIndex
modelIndex < visibleIndexDescription
TRUEevaluated 1403 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
28-1403
447 int count = visibleIndex - modelIndex;-
448 return
executed 1403 times by 3 tests: return (*visibleItems.constBegin())->position() - (count - 1) * (averageSize + spacing) - spacing;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
(*visibleItems.constBegin())->position() - (count - 1) * (averageSize + spacing) - spacing;
executed 1403 times by 3 tests: return (*visibleItems.constBegin())->position() - (count - 1) * (averageSize + spacing) - spacing;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1403
449 } else {-
450 int count = modelIndex - findLastVisibleIndex(visibleIndex) - 1;-
451 return
executed 28 times by 1 test: return (*(--visibleItems.constEnd()))->endPosition() + count * (averageSize + spacing);
Executed by:
  • tst_qquicklistview
(*(--visibleItems.constEnd()))->endPosition() + count * (averageSize + spacing);
executed 28 times by 1 test: return (*(--visibleItems.constEnd()))->endPosition() + count * (averageSize + spacing);
Executed by:
  • tst_qquicklistview
28
452 }-
453 }-
454 return
executed 6308 times by 11 tests: return 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
0;
executed 6308 times by 11 tests: return 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
6308
455}-
456-
457QString QQuickListViewPrivate::sectionAt(int modelIndex)-
458{-
459 if (FxViewItem *item = visibleItem(modelIndex)
FxViewItem *it...em(modelIndex)Description
TRUEevaluated 5898 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 660 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
660-5898
460 return
executed 5898 times by 3 tests: return item->attached->section();
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
item->attached->section();
executed 5898 times by 3 tests: return item->attached->section();
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
5898
461-
462 QString section;-
463 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 660 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& modelIndex >= 0
modelIndex >= 0Description
TRUEevaluated 660 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& modelIndex < itemCount
modelIndex < itemCountDescription
TRUEevaluated 610 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-660
464 QString propValue = model->stringValue(modelIndex, sectionCriteria->property());-
465 section = sectionCriteria->sectionString(propValue);-
466 }
executed 610 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
610
467-
468 return
executed 660 times by 4 tests: return section;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
section;
executed 660 times by 4 tests: return section;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
660
469}-
470-
471qreal QQuickListViewPrivate::snapPosAt(qreal pos)-
472{-
473 if (FxViewItem *snapItem = snapItemAt(pos)
FxViewItem *sn...napItemAt(pos)Description
TRUEevaluated 1989 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
11-1989
474 return
executed 1989 times by 1 test: return snapItem->position();
Executed by:
  • tst_qquicklistview
snapItem->position();
executed 1989 times by 1 test: return snapItem->position();
Executed by:
  • tst_qquicklistview
1989
475 if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-11
476 qreal firstPos = (*visibleItems.constBegin())->position();-
477 qreal endPos = (*(--visibleItems.constEnd()))->position();-
478 if (pos < firstPos
pos < firstPosDescription
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-11
479 return
executed 11 times by 1 test: return firstPos - qRound((firstPos - pos) / averageSize) * averageSize;
Executed by:
  • tst_qquicklistview
firstPos - qRound((firstPos - pos) / averageSize) * averageSize;
executed 11 times by 1 test: return firstPos - qRound((firstPos - pos) / averageSize) * averageSize;
Executed by:
  • tst_qquicklistview
11
480 } else if (pos > endPos
pos > endPosDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
481 return
never executed: return endPos + qRound((pos - endPos) / averageSize) * averageSize;
endPos + qRound((pos - endPos) / averageSize) * averageSize;
never executed: return endPos + qRound((pos - endPos) / averageSize) * averageSize;
0
482 }
never executed: end of block
0
483 return
never executed: return qRound((pos - originPosition()) / averageSize) * averageSize + originPosition();
qRound((pos - originPosition()) / averageSize) * averageSize + originPosition();
never executed: return qRound((pos - originPosition()) / averageSize) * averageSize + originPosition();
0
484}-
485-
486FxViewItem *QQuickListViewPrivate::snapItemAt(qreal pos)-
487{-
488 FxViewItem *snapItem = nullptr;-
489 qreal prevItemSize = 0;-
490 for (FxViewItem *item : qAsConst(visibleItems)) {-
491 if (item->index == -1
item->index == -1Description
TRUEnever evaluated
FALSEevaluated 38694 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
0-38694
492 continue;
never executed: continue;
0
493 qreal itemTop = item->position();-
494 if (highlight
highlightDescription
TRUEevaluated 38102 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 592 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& itemTop >= pos
itemTop >= posDescription
TRUEevaluated 22051 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 16051 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& item->endPosition() <= pos + highlight->size()
item->endPosit...hlight->size()Description
TRUEevaluated 2410 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 19641 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
592-38102
495 return
executed 2410 times by 2 tests: return item;
Executed by:
  • tst_examples
  • tst_qquicklistview
item;
executed 2410 times by 2 tests: return item;
Executed by:
  • tst_examples
  • tst_qquicklistview
2410
496-
497-
498 qreal halfwayToNextItem = itemTop + (item->size()+spacing) / 2;-
499 qreal halfwayToPrevItem = itemTop - (prevItemSize+spacing) / 2;-
500 if (halfwayToNextItem >= pos
halfwayToNextItem >= posDescription
TRUEevaluated 21909 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 14375 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& halfwayToPrevItem < pos
halfwayToPrevItem < posDescription
TRUEevaluated 3286 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 18623 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
3286-21909
501 snapItem = item;
executed 3286 times by 1 test: snapItem = item;
Executed by:
  • tst_qquicklistview
3286
502-
503 prevItemSize = item->size();-
504 }
executed 36284 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
36284
505 return
executed 4271 times by 2 tests: return snapItem;
Executed by:
  • tst_examples
  • tst_qquicklistview
snapItem;
executed 4271 times by 2 tests: return snapItem;
Executed by:
  • tst_examples
  • tst_qquicklistview
4271
506}-
507-
508void QQuickListViewPrivate::changedVisibleIndex(int newIndex)-
509{-
510 visiblePos = positionAt(newIndex);-
511 visibleIndex = newIndex;-
512}
executed 118 times by 3 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
118
513-
514void QQuickListViewPrivate::init()-
515{-
516 QQuickItemViewPrivate::init();-
517 ::memset(sectionCache, 0, sizeof(QQuickItem*) * sectionCacheSize);-
518}
executed 1920 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1920
519-
520void QQuickListViewPrivate::clear()-
521{-
522 for (int i = 0; i < sectionCacheSize
i < sectionCacheSizeDescription
TRUEevaluated 21040 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4208 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
; ++i) {
4208-21040
523 delete sectionCache[i];-
524 sectionCache[i] = nullptr;-
525 }
executed 21040 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
21040
526 visiblePos = 0;-
527 releaseSectionItem(currentSectionItem);-
528 currentSectionItem = nullptr;-
529 releaseSectionItem(nextSectionItem);-
530 nextSectionItem = nullptr;-
531 lastVisibleSection = QString();-
532 QQuickItemViewPrivate::clear();-
533}
executed 4208 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4208
534-
535FxViewItem *QQuickListViewPrivate::newViewItem(int modelIndex, QQuickItem *item)-
536{-
537 QQuickListView * const q = q_func();-
538-
539 FxListItemSG *listItem = new FxListItemSG(item, q, false);-
540 listItem->index = modelIndex;-
541-
542-
543 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 620 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 33073 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
620-33073
544 QString propValue = model->stringValue(modelIndex, sectionCriteria->property());-
545 QString section = sectionCriteria->sectionString(propValue);-
546 QString prevSection;-
547 QString nextSection;-
548 if (modelIndex > 0
modelIndex > 0Description
TRUEevaluated 506 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 114 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
114-506
549 if (FxViewItem *item = itemBefore(modelIndex)
FxViewItem *it...re(modelIndex)Description
TRUEevaluated 396 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 110 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
110-396
550 prevSection = item->attached->section();
executed 396 times by 3 tests: prevSection = item->attached->section();
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
396
551 else-
552 prevSection = sectionAt(modelIndex-1);
executed 110 times by 3 tests: prevSection = sectionAt(modelIndex-1);
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
110
553 }-
554 if (modelIndex < model->count()-1
modelIndex < model->count()-1Description
TRUEevaluated 574 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 46 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
46-574
555 nextSection = sectionAt(modelIndex+1);-
556 }
executed 574 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
574
557 listItem->attached->setSections(prevSection, section, nextSection);-
558 }
executed 620 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
620
559-
560 return
executed 33693 times by 10 tests: return listItem;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
listItem;
executed 33693 times by 10 tests: return listItem;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
33693
561}-
562-
563void QQuickListViewPrivate::initializeViewItem(FxViewItem *item)-
564{-
565 QQuickItemViewPrivate::initializeViewItem(item);-
566-
567-
568 item->trackGeometry(true);-
569-
570 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 620 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 33073 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& sectionCriteria->delegate()
sectionCriteria->delegate()Description
TRUEevaluated 502 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 118 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
118-33073
571 if (QString::compare(item->attached->m_prevSection, item->attached->m_section, Qt::CaseInsensitive)
QString::compa...seInsensitive)Description
TRUEevaluated 206 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 296 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
206-296
572 updateInlineSection(static_cast<FxListItemSG*>(item));
executed 206 times by 3 tests: updateInlineSection(static_cast<FxListItemSG*>(item));
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
206
573 }
executed 502 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
502
574}
executed 33693 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
33693
575-
576bool QQuickListViewPrivate::releaseItem(FxViewItem *item)-
577{-
578 if (!item
!itemDescription
TRUEevaluated 4602 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 33683 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
|| !model
!modelDescription
TRUEevaluated 2410 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 31273 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
2410-33683
579 return
executed 7012 times by 11 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
true;
executed 7012 times by 11 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
7012
580-
581 QPointer<QQuickItem> it = item->item;-
582 QQuickListViewAttached *att = static_cast<QQuickListViewAttached*>(item->attached);-
583-
584 bool released = QQuickItemViewPrivate::releaseItem(item);-
585 if (released
releasedDescription
TRUEevaluated 29071 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2202 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
&& it && att
attDescription
TRUEevaluated 29071 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& att->m_sectionItem) {
0-29071
586-
587 int i = 0;-
588 do {-
589 if (!sectionCache[i]
!sectionCache[i]Description
TRUEevaluated 132 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 198 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
132-198
590 sectionCache[i] = att->m_sectionItem;-
591 sectionCache[i]->setVisible(false);-
592 att->m_sectionItem = nullptr;-
593 break;
executed 132 times by 3 tests: break;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
132
594 }-
595 ++i;-
596 }
executed 198 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
while (i < sectionCacheSize
i < sectionCacheSizeDescription
TRUEevaluated 188 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
);
10-198
597 delete att->m_sectionItem;-
598 att->m_sectionItem = nullptr;-
599 }
executed 142 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
142
600-
601 return
executed 31273 times by 9 tests: return released;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
released;
executed 31273 times by 9 tests: return released;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
31273
602}-
603-
604bool QQuickListViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, qreal bufferFrom, qreal bufferTo, bool doBuffer)-
605{-
606 qreal itemEnd = visiblePos;-
607 if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 30181 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2190 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2190-30181
608 visiblePos = (*visibleItems.constBegin())->position();-
609 itemEnd = (*(--visibleItems.constEnd()))->endPosition() + spacing;-
610 }
executed 30181 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
30181
611-
612 int modelIndex = findLastVisibleIndex();-
613 bool haveValidItems = modelIndex >= 0;-
614 modelIndex = modelIndex < 0
modelIndex < 0Description
TRUEevaluated 2190 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 30181 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? visibleIndex : modelIndex + 1;
2190-30181
615-
616 if (haveValidItems
haveValidItemsDescription
TRUEevaluated 30181 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2190 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& (bufferFrom > itemEnd+averageSize+spacing
bufferFrom > i...geSize+spacingDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30121 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
60-30181
617 || bufferTo < visiblePos - averageSize - spacing
bufferTo < vis...Size - spacingDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30105 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)) {
16-30105
618-
619-
620 int count = (fillFrom - itemEnd) / (averageSize + spacing);-
621 int newModelIdx = qBound(0, modelIndex + count, model->count());-
622 count = newModelIdx - modelIndex;-
623 if (count
countDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
34-42
624 releaseVisibleItems();-
625 modelIndex = newModelIdx;-
626 visibleIndex = modelIndex;-
627 visiblePos = itemEnd + count * (averageSize + spacing);-
628 itemEnd = visiblePos;-
629 }
executed 42 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
42
630 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
76
631-
632 QQmlIncubator::IncubationMode incubationMode = doBuffer
doBufferDescription
TRUEevaluated 12752 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 19619 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested;
12752-19619
633-
634 bool changed = false;-
635 FxListItemSG *item = nullptr;-
636 qreal pos = itemEnd;-
637 while (modelIndex < model->count()
modelIndex < model->count()Description
TRUEevaluated 37706 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 18691 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& pos <= fillTo
pos <= fillToDescription
TRUEevaluated 25809 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 11897 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
11897-37706
638 if (!(item = static_cast<FxListItemSG*>(createItem(modelIndex, incubationMode)))
!(item = stati...ubationMode)))Description
TRUEevaluated 1783 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 24026 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
1783-24026
639 break;
executed 1783 times by 3 tests: break;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1783
640 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 24026 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
; qt_category_enabled = false) QMessageLogger(__FILE__, 685, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: append item" << modelIndex << "pos" << pos << "buffer" << doBuffer << "item" << (QObject *)(item->item);
never executed: QMessageLogger(__FILE__, 685, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: append item" << modelIndex << "pos" << pos << "buffer" << doBuffer << "item" << (QObject *)(item->item);
0-24026
641 if (!transitioner
!transitionerDescription
TRUEevaluated 20118 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 3908 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickspringanimation
|| !transitioner->canTransition(QQuickItemViewTransitioner::PopulateTransition, true)
!transitioner-...nsition, true)Description
TRUEevaluated 3768 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 140 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickspringanimation
)
140-20118
642 item->setPosition(pos, true);
executed 23886 times by 9 tests: item->setPosition(pos, true);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
23886
643 if (item->item
item->itemDescription
TRUEevaluated 24026 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-24026
644 QQuickItemPrivate::get(item->item)->setCulled(doBuffer);
executed 24026 times by 10 tests: QQuickItemPrivate::get(item->item)->setCulled(doBuffer);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
24026
645 pos += item->size() + spacing;-
646 visibleItems.append(item);-
647 ++modelIndex;-
648 changed = true;-
649 }
executed 24026 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
24026
650-
651 if (doBuffer
doBufferDescription
TRUEevaluated 12752 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 19619 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& requestedIndex != -1
requestedIndex != -1Description
TRUEevaluated 1761 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 10991 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
1761-19619
652 return
executed 1761 times by 3 tests: return changed;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
changed;
executed 1761 times by 3 tests: return changed;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1761
653-
654 while (visibleIndex > 0
visibleIndex > 0Description
TRUEevaluated 7111 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 25180 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& visibleIndex <= model->count()
visibleIndex <= model->count()Description
TRUEevaluated 7111 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& visiblePos > fillFrom
visiblePos > fillFromDescription
TRUEevaluated 1828 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 5283 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
0-25180
655 if (!(item = static_cast<FxListItemSG*>(createItem(visibleIndex-1, incubationMode)))
!(item = stati...ubationMode)))Description
TRUEevaluated 147 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1681 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
147-1681
656 break;
executed 147 times by 1 test: break;
Executed by:
  • tst_qquicklistview
147
657 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 1681 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
; qt_category_enabled = false) QMessageLogger(__FILE__, 702, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos << "buffer" << doBuffer << "item" << (QObject *)(item->item);
never executed: QMessageLogger(__FILE__, 702, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos << "buffer" << doBuffer << "item" << (QObject *)(item->item);
0-1681
658 --visibleIndex;-
659 visiblePos -= item->size() + spacing;-
660 if (!transitioner
!transitionerDescription
TRUEevaluated 1673 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| !transitioner->canTransition(QQuickItemViewTransitioner::PopulateTransition, true)
!transitioner-...nsition, true)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-1673
661 item->setPosition(visiblePos, true);
executed 1681 times by 2 tests: item->setPosition(visiblePos, true);
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1681
662 if (item->item
item->itemDescription
TRUEevaluated 1681 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-1681
663 QQuickItemPrivate::get(item->item)->setCulled(doBuffer);
executed 1681 times by 2 tests: QQuickItemPrivate::get(item->item)->setCulled(doBuffer);
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1681
664 visibleItems.prepend(item);-
665 changed = true;-
666 }
executed 1681 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1681
667-
668 return
executed 30610 times by 10 tests: return changed;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
changed;
executed 30610 times by 10 tests: return changed;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
30610
669}-
670-
671void QQuickListViewPrivate::removeItem(FxViewItem *item)-
672{-
673 if (item->transitionScheduledOrRunning()
item->transiti...ledOrRunning()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2578 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
14-2578
674 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
; qt_category_enabled = false) QMessageLogger(__FILE__, 719, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "\tnot releasing animating item" << item->index << (QObject *)(item->item);
never executed: QMessageLogger(__FILE__, 719, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "\tnot releasing animating item" << item->index << (QObject *)(item->item);
0-14
675 item->releaseAfterTransition = true;-
676 releasePendingTransition.append(item);-
677 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
14
678 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 2578 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
; qt_category_enabled = false) QMessageLogger(__FILE__, 723, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "\treleasing stationary item" << item->index << (QObject *)(item->item);
never executed: QMessageLogger(__FILE__, 723, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "\treleasing stationary item" << item->index << (QObject *)(item->item);
0-2578
679 releaseItem(item);-
680 }
executed 2578 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
2578
681}-
682-
683bool QQuickListViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)-
684{-
685 FxViewItem *item = nullptr;-
686 bool changed = false;-
687-
688-
689-
690-
691-
692 int index = 0;-
693 while (visibleItems.count() > 1
visibleItems.count() > 1Description
TRUEevaluated 20597 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 322 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 20597 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
0-20597
694 && (
(item = visibl...ems.at(index))Description
TRUEevaluated 20597 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
item = visibleItems.at(index))
(item = visibl...ems.at(index))Description
TRUEevaluated 20597 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& item->endPosition() < bufferFrom
item->endPosit...) < bufferFromDescription
TRUEevaluated 1300 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 19297 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
0-20597
695 if (item->attached->delayRemove()
item->attached->delayRemove()Description
TRUEnever evaluated
FALSEevaluated 1300 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
0-1300
696 break;
never executed: break;
0
697-
698 if (item->size() > 0
item->size() > 0Description
TRUEevaluated 1292 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
8-1292
699 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 1292 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
; qt_category_enabled = false) QMessageLogger(__FILE__, 744, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
never executed: QMessageLogger(__FILE__, 744, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
0-1292
700-
701 while (item
itemDescription
TRUEevaluated 1296 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-1296
702 if (item->index != -1
item->index != -1Description
TRUEevaluated 1296 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-1296
703 visibleIndex++;
executed 1296 times by 2 tests: visibleIndex++;
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1296
704 visibleItems.removeAt(index);-
705 removeItem(item);-
706 if (index == 0
index == 0Description
TRUEevaluated 1292 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
4-1292
707 break;
executed 1292 times by 2 tests: break;
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1292
708 item = visibleItems.at(--index);-
709 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
4
710 changed = true;-
711 }
executed 1292 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
else {
1292
712 index++;-
713 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
8
714 }-
715-
716 while (visibleItems.count() > 1
visibleItems.count() > 1Description
TRUEevaluated 20492 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 324 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& (
(item = visibl...s.constLast())Description
TRUEevaluated 20492 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
item = visibleItems.constLast())
(item = visibl...s.constLast())Description
TRUEevaluated 20492 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& item->position() > bufferTo
item->position() > bufferToDescription
TRUEevaluated 1197 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 19295 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
0-20492
717 if (item->attached->delayRemove()
item->attached->delayRemove()Description
TRUEnever evaluated
FALSEevaluated 1197 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
0-1197
718 break;
never executed: break;
0
719 for (bool qt_category_enabled = lcItemViewDelegateLifecycle().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 1197 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
; qt_category_enabled = false) QMessageLogger(__FILE__, 764, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: remove last" << visibleIndex+visibleItems.count()-1 << item->position() << (QObject *)(item->item);
never executed: QMessageLogger(__FILE__, 764, __PRETTY_FUNCTION__, lcItemViewDelegateLifecycle().categoryName()).debug() << "refill: remove last" << visibleIndex+visibleItems.count()-1 << item->position() << (QObject *)(item->item);
0-1197
720 visibleItems.removeLast();-
721 removeItem(item);-
722 changed = true;-
723 }
executed 1197 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1197
724-
725 return
executed 19619 times by 10 tests: return changed;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
changed;
executed 19619 times by 10 tests: return changed;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
19619
726}-
727-
728void QQuickListViewPrivate::visibleItemsChanged()-
729{-
730 if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 5566 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-5566
731 visiblePos = (*visibleItems.constBegin())->position();
executed 5566 times by 10 tests: visiblePos = (*visibleItems.constBegin())->position();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
5566
732 updateAverage();-
733 if (currentIndex >= 0
currentIndex >= 0Description
TRUEevaluated 3918 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 1648 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& currentItem
currentItemDescription
TRUEevaluated 3628 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 290 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& !visibleItem(currentIndex)
!visibleItem(currentIndex)Description
TRUEevaluated 901 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 2727 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
290-3918
734 static_cast<FxListItemSG*>(currentItem)->setPosition(positionAt(currentIndex));-
735 updateHighlight();-
736 }
executed 901 times by 3 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
901
737 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 201 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 5365 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
201-5365
738 updateCurrentSection();
executed 201 times by 4 tests: updateCurrentSection();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
201
739 updateUnrequestedPositions();-
740}
executed 5566 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
5566
741-
742void QQuickListViewPrivate::layoutVisibleItems(int fromModelIndex)-
743{-
744 if (!visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 3341 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 124 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
124-3341
745 const qreal from = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 370 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2971 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? -position()-displayMarginBeginning-size() : position()-displayMarginBeginning;
370-2971
746 const qreal to = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 370 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2971 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? -position()+displayMarginEnd : position()+size()+displayMarginEnd;
370-2971
747-
748 FxViewItem *firstItem = *visibleItems.constBegin();-
749 bool fixedCurrent = currentItem
currentItemDescription
TRUEevaluated 3318 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& firstItem->item == currentItem->item
firstItem->ite...rentItem->itemDescription
TRUEevaluated 2286 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1032 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
;
23-3318
750 qreal sum = firstItem->size();-
751 qreal pos = firstItem->position() + firstItem->size() + spacing;-
752 firstItem->setVisible(firstItem->endPosition() >= from && firstItem->position() <= to);-
753-
754 for (int i=1; i < visibleItems.count()
i < visibleItems.count()Description
TRUEevaluated 39094 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 3341 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
; ++i) {
3341-39094
755 FxListItemSG *item = static_cast<FxListItemSG*>(visibleItems.at(i));-
756 if (item->index >= fromModelIndex
item->index >= fromModelIndexDescription
TRUEevaluated 36903 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2191 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
2191-36903
757 item->setPosition(pos);-
758 item->setVisible(item->endPosition() >= from && item->position() <= to);-
759 }
executed 36903 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
36903
760 pos += item->size() + spacing;-
761 sum += item->size();-
762 fixedCurrent = fixedCurrent
fixedCurrentDescription
TRUEevaluated 29997 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 9097 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
|| (currentItem
currentItemDescription
TRUEevaluated 8896 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 201 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& item->item == currentItem->item
item->item == ...rentItem->itemDescription
TRUEevaluated 647 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 8249 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
);
201-29997
763 }
executed 39094 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
39094
764 averageSize = qRound(sum / visibleItems.count());-
765-
766-
767 if (currentIndex >= 0
currentIndex >= 0Description
TRUEevaluated 3320 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& currentItem
currentItemDescription
TRUEevaluated 3318 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !fixedCurrent
!fixedCurrentDescription
TRUEevaluated 385 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 2933 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
2-3320
768 static_cast<
executed 385 times by 2 tests: static_cast<FxListItemSG*>(currentItem)->setPosition(positionAt(currentIndex));
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
FxListItemSG*>(currentItem)->setPosition(positionAt(currentIndex));
executed 385 times by 2 tests: static_cast<FxListItemSG*>(currentItem)->setPosition(positionAt(currentIndex));
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
385
769-
770 updateCurrentSection();-
771 updateStickySections();-
772 }
executed 3341 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3341
773}
executed 3465 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3465
774-
775void QQuickListViewPrivate::repositionItemAt(FxViewItem *item, int index, qreal sizeBuffer)-
776{-
777 static_cast<FxListItemSG *>(item)->setPosition(positionAt(index) + sizeBuffer);-
778}
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
34
779-
780void QQuickListViewPrivate::repositionPackageItemAt(QQuickItem *item, int index)-
781{-
782 QQuickListView * const q = q_func();-
783 qreal pos = position();-
784 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 342 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-342
785 if (item->y() + item->height() > pos
item->y() + it...height() > posDescription
TRUEevaluated 320 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& item->y() < pos + q->height()
item->y() < pos + q->height()Description
TRUEevaluated 304 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
16-320
786 if (isBottomToTop()
isBottomToTop()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 300 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
4-300
787 item->setY(-positionAt(index)-item->height());
executed 4 times by 1 test: item->setY(-positionAt(index)-item->height());
Executed by:
  • tst_qquicklistview
4
788 else-
789 item->setY(positionAt(index));
executed 300 times by 2 tests: item->setY(positionAt(index));
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
300
790 }-
791 }
executed 342 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
else {
342
792 if (item->x() + item->width() > pos
item->x() + it...>width() > posDescription
TRUEnever evaluated
FALSEnever evaluated
&& item->x() < pos + q->width()
item->x() < pos + q->width()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
793 if (isRightToLeft()
isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
794 item->setX(-positionAt(index)-item->width());
never executed: item->setX(-positionAt(index)-item->width());
0
795 else-
796 item->setX(positionAt(index));
never executed: item->setX(positionAt(index));
0
797 }-
798 }
never executed: end of block
0
799}-
800-
801void QQuickListViewPrivate::resetFirstItemPosition(qreal pos)-
802{-
803 FxListItemSG *item = static_cast<FxListItemSG*>(visibleItems.constFirst());-
804 item->setPosition(pos);-
805}
executed 817 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
817
806-
807void QQuickListViewPrivate::adjustFirstItem(qreal forwards, qreal backwards, int)-
808{-
809 if (!visibleItems.count()
!visibleItems.count()Description
TRUEnever evaluated
FALSEevaluated 1443 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
0-1443
810 return;
never executed: return;
0
811 qreal diff = forwards - backwards;-
812 static_cast<FxListItemSG*>(visibleItems.constFirst())->setPosition(visibleItems.constFirst()->position() + diff);-
813}
executed 1443 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1443
814-
815void QQuickListViewPrivate::updateSizeChangesBeforeVisiblePos(FxViewItem *item, ChangeResult *removeResult)-
816{-
817 if (item != visibleItems.constFirst()
item != visibl...s.constFirst()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 78 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
28-78
818 QQuickItemViewPrivate::updateSizeChangesBeforeVisiblePos(item, removeResult);
executed 28 times by 1 test: QQuickItemViewPrivate::updateSizeChangesBeforeVisiblePos(item, removeResult);
Executed by:
  • tst_qquicklistview
28
819}
executed 106 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
106
820-
821void QQuickListViewPrivate::createHighlight()-
822{-
823 QQuickListView * const q = q_func();-
824 bool changed = false;-
825 if (highlight
highlightDescription
TRUEevaluated 2200 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4924 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2200-4924
826 if (trackedItem == highlight
trackedItem == highlightDescription
TRUEevaluated 2200 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-2200
827 trackedItem = nullptr;
executed 2200 times by 9 tests: trackedItem = nullptr;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2200
828 delete highlight;-
829 highlight = nullptr;-
830-
831 delete highlightPosAnimator;-
832 delete highlightWidthAnimator;-
833 delete highlightHeightAnimator;-
834 highlightPosAnimator = nullptr;-
835 highlightWidthAnimator = nullptr;-
836 highlightHeightAnimator = nullptr;-
837-
838 changed = true;-
839 }
executed 2200 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2200
840-
841 if (currentItem
currentItemDescription
TRUEevaluated 2212 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4912 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2212-4912
842 QQuickItem *item = createHighlightItem();-
843 if (item
itemDescription
TRUEevaluated 2204 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
8-2204
844 FxListItemSG *newHighlight = new FxListItemSG(item, q, true);-
845 newHighlight->trackGeometry(true);-
846-
847 if (autoHighlight
autoHighlightDescription
TRUEevaluated 2194 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
10-2194
848 newHighlight->setSize(static_cast<FxListItemSG*>(currentItem)->itemSize());-
849 newHighlight->setPosition(static_cast<FxListItemSG*>(currentItem)->itemPosition());-
850 }
executed 2194 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2194
851 const QLatin1String posProp(orient == QQuickListView::Vertical ? "y" : "x");-
852 highlightPosAnimator = new QSmoothedAnimation;-
853 highlightPosAnimator->target = QQmlProperty(item, posProp);-
854 highlightPosAnimator->velocity = highlightMoveVelocity;-
855 highlightPosAnimator->userDuration = highlightMoveDuration;-
856-
857 highlightWidthAnimator = new QSmoothedAnimation;-
858 highlightWidthAnimator->velocity = highlightResizeVelocity;-
859 highlightWidthAnimator->userDuration = highlightResizeDuration;-
860 highlightWidthAnimator->target = QQmlProperty(item, ([]() noexcept -> QString { enum { Size = sizeof(u"" "width")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "width" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 2204 times by 10 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 2204 times by 10 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}()));
2204
861-
862 highlightHeightAnimator = new QSmoothedAnimation;-
863 highlightHeightAnimator->velocity = highlightResizeVelocity;-
864 highlightHeightAnimator->userDuration = highlightResizeDuration;-
865 highlightHeightAnimator->target = QQmlProperty(item, ([]() noexcept -> QString { enum { Size = sizeof(u"" "height")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "height" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 2204 times by 10 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 2204 times by 10 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}()));
2204
866-
867 highlight = newHighlight;-
868 changed = true;-
869 }
executed 2204 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2204
870 }
executed 2212 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2212
871 if (changed
changedDescription
TRUEevaluated 4402 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2722 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
2722-4402
872 q->highlightItemChanged();
executed 4402 times by 10 tests: q->highlightItemChanged();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4402
873}
executed 7124 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
7124
874-
875void QQuickListViewPrivate::updateHighlight()-
876{-
877 applyPendingChanges();-
878-
879 if ((!currentItem
!currentItemDescription
TRUEevaluated 79 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 11043 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& highlight
highlightDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_qquicklistview
) || (currentItem
currentItemDescription
TRUEevaluated 11043 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !highlight
!highlightDescription
TRUEevaluated 2202 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 8841 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
))
27-11043
880 createHighlight();
executed 2254 times by 10 tests: createHighlight();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2254
881 bool strictHighlight = haveHighlightRange
haveHighlightRangeDescription
TRUEevaluated 1360 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 9762 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& highlightRange == QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEevaluated 1342 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
;
18-9762
882 if (currentItem
currentItemDescription
TRUEevaluated 11043 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& autoHighlight
autoHighlightDescription
TRUEevaluated 11013 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& highlight
highlightDescription
TRUEevaluated 11009 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& (!strictHighlight
!strictHighlightDescription
TRUEevaluated 9667 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1342 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
|| !pressed
!pressedDescription
TRUEevaluated 1246 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 96 times by 1 test
Evaluated by:
  • tst_qquicklistview
)) {
4-11043
883-
884 FxListItemSG *listItem = static_cast<FxListItemSG*>(currentItem);-
885 highlightPosAnimator->to = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 1124 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 9789 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1124-9789
886 ? -listItem->itemPosition()-listItem->itemSize()-
887 : listItem->itemPosition();-
888 highlightWidthAnimator->to = listItem->item->width();-
889 highlightHeightAnimator->to = listItem->item->height();-
890 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 9936 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 977 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
977-9936
891 if (highlight->item->width() == 0
highlight->item->width() == 0Description
TRUEevaluated 1935 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 8001 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
1935-8001
892 highlight->item->setWidth(currentItem->item->width());
executed 1935 times by 10 tests: highlight->item->setWidth(currentItem->item->width());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1935
893 }
executed 9936 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else {
9936
894 if (highlight->item->height() == 0
highlight->item->height() == 0Description
TRUEevaluated 178 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 799 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
178-799
895 highlight->item->setHeight(currentItem->item->height());
executed 178 times by 2 tests: highlight->item->setHeight(currentItem->item->height());
Executed by:
  • tst_examples
  • tst_qquicklistview
178
896 }
executed 977 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
977
897-
898 highlightPosAnimator->restart();-
899 highlightWidthAnimator->restart();-
900 highlightHeightAnimator->restart();-
901 }
executed 10913 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
10913
902 updateTrackedItem();-
903}
executed 11122 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
11122
904-
905void QQuickListViewPrivate::resetHighlightPosition()-
906{-
907 if (highlight
highlightDescription
TRUEevaluated 1930 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& currentItem
currentItemDescription
TRUEevaluated 1930 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-1930
908 static_cast<
executed 1930 times by 10 tests: static_cast<FxListItemSG*>(highlight)->setPosition(static_cast<FxListItemSG*>(currentItem)->itemPosition());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FxListItemSG*>(highlight)->setPosition(static_cast<FxListItemSG*>(currentItem)->itemPosition());
executed 1930 times by 10 tests: static_cast<FxListItemSG*>(highlight)->setPosition(static_cast<FxListItemSG*>(currentItem)->itemPosition());
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1930
909}
executed 1930 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1930
910-
911bool QQuickListViewPrivate::movingFromHighlight()-
912{-
913 if (!haveHighlightRange
!haveHighlightRangeDescription
TRUEevaluated 2893 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 128 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
|| highlightRange != QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
2-2893
914 return
executed 2895 times by 7 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
false;
executed 2895 times by 7 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2895
915-
916 return
executed 126 times by 2 tests: return (highlightPosAnimator && highlightPosAnimator->isRunning()) || (highlightHeightAnimator && highlightHeightAnimator->isRunning()) || (highlightWidthAnimator && highlightWidthAnimator->isRunning());
Executed by:
  • tst_examples
  • tst_qquicklistview
(highlightPosAnimator && highlightPosAnimator->isRunning()) ||
executed 126 times by 2 tests: return (highlightPosAnimator && highlightPosAnimator->isRunning()) || (highlightHeightAnimator && highlightHeightAnimator->isRunning()) || (highlightWidthAnimator && highlightWidthAnimator->isRunning());
Executed by:
  • tst_examples
  • tst_qquicklistview
126
917 (highlightHeightAnimator && highlightHeightAnimator->isRunning()) ||
executed 126 times by 2 tests: return (highlightPosAnimator && highlightPosAnimator->isRunning()) || (highlightHeightAnimator && highlightHeightAnimator->isRunning()) || (highlightWidthAnimator && highlightWidthAnimator->isRunning());
Executed by:
  • tst_examples
  • tst_qquicklistview
126
918 (highlightWidthAnimator && highlightWidthAnimator->isRunning());
executed 126 times by 2 tests: return (highlightPosAnimator && highlightPosAnimator->isRunning()) || (highlightHeightAnimator && highlightHeightAnimator->isRunning()) || (highlightWidthAnimator && highlightWidthAnimator->isRunning());
Executed by:
  • tst_examples
  • tst_qquicklistview
126
919}-
920-
921-
922QQuickItem * QQuickListViewPrivate::getSectionItem(const QString &section)-
923{-
924 QQuickListView * const q = q_func();-
925 QQuickItem *sectionItem = nullptr;-
926 int i = sectionCacheSize-1;-
927 while (i >= 0
i >= 0Description
TRUEevaluated 1008 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 182 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
&& !sectionCache[i]
!sectionCache[i]Description
TRUEevaluated 988 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
20-1008
928 --
executed 988 times by 3 tests: --i;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
i;
executed 988 times by 3 tests: --i;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
988
929 if (i >= 0
i >= 0Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 182 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
20-182
930 sectionItem = sectionCache[i];-
931 sectionCache[i] = nullptr;-
932 sectionItem->setVisible(true);-
933 QQmlContext *context = QQmlEngine::contextForObject(sectionItem)->parentContext();-
934 context->setContextProperty(QLatin1String("section"), section);-
935 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
20
936 QQmlContext *creationContext = sectionCriteria->delegate()->creationContext();-
937 QQmlContext *context = new QQmlContext(-
938 creationContext ? creationContext : qmlContext(q));-
939 context->setContextProperty(QLatin1String("section"), section);-
940 QObject *nobj = sectionCriteria->delegate()->beginCreate(context);-
941 if (nobj
nobjDescription
TRUEevaluated 182 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
) {
0-182
942 QQml_setParent_noEvent(context, nobj);-
943 sectionItem = qobject_cast<QQuickItem *>(nobj);-
944 if (!sectionItem
!sectionItemDescription
TRUEnever evaluated
FALSEevaluated 182 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
0-182
945 delete nobj;-
946 }
never executed: end of block
else {
0
947 if (qFuzzyIsNull(sectionItem->z())
qFuzzyIsNull(sectionItem->z())Description
TRUEevaluated 180 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
2-180
948 sectionItem->setZ(2);
executed 180 times by 3 tests: sectionItem->setZ(2);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
180
949 QQml_setParent_noEvent(sectionItem, contentItem);-
950 sectionItem->setParentItem(contentItem);-
951 }
executed 182 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
182
952-
953 QQuickItemViewAttached *attached = static_cast<QQuickItemViewAttached*>(qmlAttachedPropertiesObject<QQuickListView>(sectionItem));-
954 attached->setView(q);-
955 }
executed 182 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
else {
182
956 delete context;-
957 }
never executed: end of block
0
958 sectionCriteria->delegate()->completeCreate();-
959 }
executed 182 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
182
960-
961 return
executed 202 times by 3 tests: return sectionItem;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
sectionItem;
executed 202 times by 3 tests: return sectionItem;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
202
962}-
963-
964void QQuickListViewPrivate::releaseSectionItem(QQuickItem *item)-
965{-
966 if (!item
!itemDescription
TRUEevaluated 8416 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
40-8416
967 return;
executed 8416 times by 11 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
8416
968 int i = 0;-
969 do {-
970 if (!sectionCache[i]
!sectionCache[i]Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 106 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
24-106
971 sectionCache[i] = item;-
972 sectionCache[i]->setVisible(false);-
973 return;
executed 24 times by 1 test: return;
Executed by:
  • tst_qquicklistview
24
974 }-
975 ++i;-
976 }
executed 106 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
while (i < sectionCacheSize
i < sectionCacheSizeDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
);
16-106
977 delete item;-
978}
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
16
979-
980-
981void QQuickListViewPrivate::releaseSectionItems()-
982{-
983 for (FxViewItem *item : qAsConst(visibleItems)) {-
984 FxListItemSG *listItem = static_cast<FxListItemSG *>(item);-
985 if (listItem->section()
listItem->section()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-26
986 qreal pos = listItem->position();-
987 releaseSectionItem(listItem->section());-
988 listItem->setSection(nullptr);-
989 listItem->setPosition(pos);-
990 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
26
991 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
26
992 for (int i = 0; i < sectionCacheSize
i < sectionCacheSizeDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
; ++i) {
2-10
993 delete sectionCache[i];-
994 sectionCache[i] = nullptr;-
995 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
10
996}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
997-
998void QQuickListViewPrivate::updateInlineSection(FxListItemSG *listItem)-
999{-
1000 if (!sectionCriteria
!sectionCriteriaDescription
TRUEnever evaluated
FALSEevaluated 6418 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
|| !sectionCriteria->delegate()
!sectionCriteria->delegate()Description
TRUEevaluated 792 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 5626 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
)
0-6418
1001 return;
executed 792 times by 2 tests: return;
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
792
1002 if (QString::compare(listItem->attached->m_prevSection, listItem->attached->m_section, Qt::CaseInsensitive)
QString::compa...seInsensitive)Description
TRUEevaluated 4688 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 938 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
938-4688
1003 && (sectionCriteria->labelPositioning() & QQuickViewSection::InlineLabels
sectionCriteri...::InlineLabelsDescription
TRUEevaluated 4688 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
0-4688
1004 || (listItem->index == 0
listItem->index == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& sectionCriteria->labelPositioning() & QQuickViewSection::CurrentLabelAtStart
sectionCriteri...ntLabelAtStartDescription
TRUEnever evaluated
FALSEnever evaluated
))) {
0
1005 if (!listItem->section()
!listItem->section()Description
TRUEevaluated 194 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 4494 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
194-4494
1006 qreal pos = listItem->position();-
1007 listItem->setSection(getSectionItem(listItem->attached->m_section));-
1008 listItem->setPosition(pos);-
1009 }
executed 194 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
else {
194
1010 QQmlContext *context = QQmlEngine::contextForObject(listItem->section())->parentContext();-
1011 context->setContextProperty(QLatin1String("section"), listItem->attached->m_section);-
1012 }
executed 4494 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
4494
1013 } else if (listItem->section()
listItem->section()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 932 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
6-932
1014 qreal pos = listItem->position();-
1015 releaseSectionItem(listItem->section());-
1016 listItem->setSection(nullptr);-
1017 listItem->setPosition(pos);-
1018 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
6
1019}
executed 5626 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
5626
1020-
1021void QQuickListViewPrivate::updateStickySections()-
1022{-
1023 if (!sectionCriteria
!sectionCriteriaDescription
TRUEevaluated 3014 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 975 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
|| !sectionCriteria->delegate()
!sectionCriteria->delegate()Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
50-3014
1024 || (!sectionCriteria->labelPositioning()
!sectionCriter...lPositioning()Description
TRUEnever evaluated
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
&& !currentSectionItem
!currentSectionItemDescription
TRUEnever evaluated
FALSEnever evaluated
&& !nextSectionItem
!nextSectionItemDescription
TRUEnever evaluated
FALSEnever evaluated
))
0-925
1025 return;
executed 3064 times by 6 tests: return;
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3064
1026-
1027 bool isFlowReversed = isContentFlowReversed();-
1028 qreal viewPos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
? -position()-size() : position();
0-925
1029 qreal startPos = hasStickyHeader()
hasStickyHeader()Description
TRUEnever evaluated
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
? header->endPosition() : viewPos;
0-925
1030 qreal endPos = hasStickyFooter()
hasStickyFooter()Description
TRUEnever evaluated
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
? footer->position() : viewPos + size();
0-925
1031-
1032 QQuickItem *sectionItem = nullptr;-
1033 QQuickItem *lastSectionItem = nullptr;-
1034 int index = 0;-
1035 while (index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 8887 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 925 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
925-8887
1036 if (QQuickItem *section = static_cast<FxListItemSG *>(visibleItems.at(index))->section()
QQuickItem *se...x))->section()Description
TRUEevaluated 3872 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 5015 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
3872-5015
1037-
1038-
1039 qreal sectionPos = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 3872 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
? section->y() : section->x();
0-3872
1040 qreal sectionSize = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 3872 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
? section->height() : section->width();
0-3872
1041 bool visTop = true;-
1042 if (sectionCriteria->labelPositioning() & QQuickViewSection::CurrentLabelAtStart
sectionCriteri...ntLabelAtStartDescription
TRUEevaluated 403 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3469 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
)
403-3469
1043 visTop = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 403 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -sectionPos-sectionSize >= startPos : sectionPos >= startPos;
executed 403 times by 1 test: visTop = isFlowReversed ? -sectionPos-sectionSize >= startPos : sectionPos >= startPos;
Executed by:
  • tst_qquicklistview
0-403
1044 bool visBot = true;-
1045 if (sectionCriteria->labelPositioning() & QQuickViewSection::NextLabelAtEnd
sectionCriteri...NextLabelAtEndDescription
TRUEevaluated 383 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3489 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
)
383-3489
1046 visBot = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 383 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -sectionPos <= endPos : sectionPos + sectionSize < endPos;
executed 383 times by 1 test: visBot = isFlowReversed ? -sectionPos <= endPos : sectionPos + sectionSize < endPos;
Executed by:
  • tst_qquicklistview
0-383
1047 section->setVisible(visBot && visTop);-
1048 if (visTop
visTopDescription
TRUEevaluated 3832 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !sectionItem
!sectionItemDescription
TRUEevaluated 865 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 2967 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
40-3832
1049 sectionItem = section;
executed 865 times by 3 tests: sectionItem = section;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
865
1050 if (isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 3872 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
0-3872
1051 if (-
-sectionPos <= endPosDescription
TRUEnever evaluated
FALSEnever evaluated
sectionPos <= endPos
-sectionPos <= endPosDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1052 lastSectionItem = section;
never executed: lastSectionItem = section;
0
1053 }
never executed: end of block
else {
0
1054 if (sectionPos + sectionSize < endPos
sectionPos + s...nSize < endPosDescription
TRUEevaluated 3212 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 660 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
660-3212
1055 lastSectionItem = section;
executed 3212 times by 3 tests: lastSectionItem = section;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
3212
1056 }
executed 3872 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
3872
1057 }-
1058 ++index;-
1059 }
executed 8887 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
8887
1060-
1061-
1062 if (sectionCriteria->labelPositioning() & QQuickViewSection::CurrentLabelAtStart
sectionCriteri...ntLabelAtStartDescription
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 822 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
&& isValid()
isValid()Description
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& visibleItems.count()
visibleItems.count()Description
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-822
1063 if (!currentSectionItem
!currentSectionItemDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-86
1064 currentSectionItem = getSectionItem(currentSection);-
1065 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (QString::compare(currentStickySection, currentSection, Qt::CaseInsensitive)
QString::compa...seInsensitive)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-76
1066 QQmlContext *context = QQmlEngine::contextForObject(currentSectionItem)->parentContext();-
1067 context->setContextProperty(QLatin1String("section"), currentSection);-
1068 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
10
1069 currentStickySection = currentSection;-
1070 if (!currentSectionItem
!currentSectionItemDescription
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-90
1071 return;
never executed: return;
0
1072-
1073 qreal sectionSize = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? currentSectionItem->height() : currentSectionItem->width();
0-90
1074 bool atBeginning = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? (isBottomToTop()
isBottomToTop()Description
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
? vData.atEnd : vData.atBeginning) : (isRightToLeft()
isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
? hData.atEnd : hData.atBeginning);
0-90
1075-
1076 currentSectionItem->setVisible(!atBeginning && (!header || hasStickyHeader() || header->endPosition() < viewPos));-
1077 qreal pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
? position() + size() - sectionSize : startPos;
0-90
1078 if (header
headerDescription
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-90
1079 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEnever evaluated
? qMin(-header->endPosition() - sectionSize, pos) : qMax(header->endPosition(), pos);
never executed: pos = isFlowReversed ? qMin(-header->endPosition() - sectionSize, pos) : qMax(header->endPosition(), pos);
0
1080 if (sectionItem
sectionItemDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-90
1081 qreal sectionPos = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? sectionItem->y() : sectionItem->x();
0-90
1082 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
? qMax(pos, sectionPos + sectionSize) : qMin(pos, sectionPos - sectionSize);
0-90
1083 }
executed 90 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
90
1084 if (footer
footerDescription
TRUEnever evaluated
FALSEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-90
1085 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEnever evaluated
? qMax(-footer->position(), pos) : qMin(footer->position() - sectionSize, pos);
never executed: pos = isFlowReversed ? qMax(-footer->position(), pos) : qMin(footer->position() - sectionSize, pos);
0
1086 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-90
1087 currentSectionItem->setY(pos);
executed 90 times by 1 test: currentSectionItem->setY(pos);
Executed by:
  • tst_qquicklistview
90
1088 else-
1089 currentSectionItem->setX(pos);
never executed: currentSectionItem->setX(pos);
0
1090 } else if (currentSectionItem
currentSectionItemDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 831 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
4-831
1091 releaseSectionItem(currentSectionItem);-
1092 currentSectionItem = nullptr;-
1093 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
4
1094-
1095-
1096 if (sectionCriteria->labelPositioning() & QQuickViewSection::NextLabelAtEnd
sectionCriteri...NextLabelAtEndDescription
TRUEevaluated 99 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 826 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
&& isValid()
isValid()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& visibleItems.count()
visibleItems.count()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-826
1097 if (!nextSectionItem
!nextSectionItemDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-82
1098 nextSectionItem = getSectionItem(nextSection);-
1099 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (QString::compare(nextStickySection, nextSection, Qt::CaseInsensitive)
QString::compa...seInsensitive)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-66
1100 QQmlContext *context = QQmlEngine::contextForObject(nextSectionItem)->parentContext();-
1101 context->setContextProperty(QLatin1String("section"), nextSection);-
1102 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
16
1103 nextStickySection = nextSection;-
1104 if (!nextSectionItem
!nextSectionItemDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-86
1105 return;
never executed: return;
0
1106-
1107 qreal sectionSize = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? nextSectionItem->height() : nextSectionItem->width();
0-86
1108 nextSectionItem->setVisible(!nextSection.isEmpty());-
1109 qreal pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
? position() : endPos - sectionSize;
0-86
1110 if (footer
footerDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-86
1111 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEnever evaluated
? qMax(-footer->position(), pos) : qMin(footer->position() - sectionSize, pos);
never executed: pos = isFlowReversed ? qMax(-footer->position(), pos) : qMin(footer->position() - sectionSize, pos);
0
1112 if (lastSectionItem
lastSectionItemDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-86
1113 qreal sectionPos = orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? lastSectionItem->y() : lastSectionItem->x();
0-86
1114 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
? qMin(pos, sectionPos - sectionSize) : qMax(pos, sectionPos + sectionSize);
0-86
1115 }
executed 86 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
86
1116 if (header
headerDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-86
1117 pos = isFlowReversed
isFlowReversedDescription
TRUEnever evaluated
FALSEnever evaluated
? qMin(-header->endPosition() - sectionSize, pos) : qMax(header->endPosition(), pos);
never executed: pos = isFlowReversed ? qMin(-header->endPosition() - sectionSize, pos) : qMax(header->endPosition(), pos);
0
1118 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-86
1119 nextSectionItem->setY(pos);
executed 86 times by 1 test: nextSectionItem->setY(pos);
Executed by:
  • tst_qquicklistview
86
1120 else-
1121 nextSectionItem->setX(pos);
never executed: nextSectionItem->setX(pos);
0
1122 } else if (nextSectionItem
nextSectionItemDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 835 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
4-835
1123 releaseSectionItem(nextSectionItem);-
1124 nextSectionItem = nullptr;-
1125 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
4
1126}
executed 925 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
925
1127-
1128void QQuickListViewPrivate::updateSections()-
1129{-
1130 QQuickListView * const q = q_func();-
1131 if (!q->isComponentComplete()
!q->isComponentComplete()Description
TRUEnever evaluated
FALSEevaluated 6944 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
0-6944
1132 return;
never executed: return;
0
1133-
1134 QQuickItemViewPrivate::updateSections();-
1135-
1136 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 627 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 6317 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& !visibleItems.isEmpty()
!visibleItems.isEmpty()Description
TRUEevaluated 575 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 52 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& isValid()
isValid()Description
TRUEevaluated 560 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
15-6317
1137 QString prevSection;-
1138 if (visibleIndex > 0
visibleIndex > 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 556 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
4-556
1139 prevSection = sectionAt(visibleIndex-1);
executed 4 times by 1 test: prevSection = sectionAt(visibleIndex-1);
Executed by:
  • tst_qquicklistview
4
1140 QQuickListViewAttached *prevAtt = nullptr;-
1141 int prevIdx = -1;-
1142 int idx = -1;-
1143 for (FxViewItem *item : qAsConst(visibleItems)) {-
1144 QQuickListViewAttached *attached = static_cast<QQuickListViewAttached*>(item->attached);-
1145 attached->setPrevSection(prevSection);-
1146 if (item->index != -1
item->index != -1Description
TRUEevaluated 6174 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
38-6174
1147 QString propValue = model->stringValue(item->index, sectionCriteria->property());-
1148 attached->setSection(sectionCriteria->sectionString(propValue));-
1149 idx = item->index;-
1150 }
executed 6174 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
6174
1151 updateInlineSection(static_cast<FxListItemSG*>(item));-
1152 if (prevAtt
prevAttDescription
TRUEevaluated 5652 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 560 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
560-5652
1153 prevAtt->setNextSection(sectionAt(prevIdx+1));
executed 5652 times by 3 tests: prevAtt->setNextSection(sectionAt(prevIdx+1));
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
5652
1154 prevSection = attached->section();-
1155 prevAtt = attached;-
1156 prevIdx = item->index;-
1157 }
executed 6212 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
6212
1158 if (prevAtt
prevAttDescription
TRUEevaluated 560 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-560
1159 if (idx > 0
idx > 0Description
TRUEevaluated 556 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
&& idx < model->count()-1
idx < model->count()-1Description
TRUEevaluated 114 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 442 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
4-556
1160 prevAtt->setNextSection(sectionAt(idx+1));
executed 114 times by 2 tests: prevAtt->setNextSection(sectionAt(idx+1));
Executed by:
  • tst_examples
  • tst_qquicklistview
114
1161 else-
1162 prevAtt->setNextSection(QString());
executed 446 times by 4 tests: prevAtt->setNextSection(QString());
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
446
1163 }-
1164 }
executed 560 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
560
1165-
1166 lastVisibleSection = QString();-
1167}
executed 6944 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
6944
1168-
1169void QQuickListViewPrivate::updateCurrentSection()-
1170{-
1171 QQuickListView * const q = q_func();-
1172 if (!sectionCriteria
!sectionCriteriaDescription
TRUEevaluated 3014 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1000 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
|| visibleItems.isEmpty()
visibleItems.isEmpty()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 986 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
14-3014
1173 if (!currentSection.isEmpty()
!currentSection.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3026 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2-3026
1174 currentSection.clear();-
1175 q->currentSectionChanged();-
1176 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
1177 return;
executed 3028 times by 6 tests: return;
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3028
1178 }-
1179 bool inlineSections = sectionCriteria->labelPositioning() & QQuickViewSection::InlineLabels;-
1180 qreal viewPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEnever evaluated
FALSEevaluated 986 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
? -position()-size() : position();
0-986
1181 qreal startPos = hasStickyHeader()
hasStickyHeader()Description
TRUEnever evaluated
FALSEevaluated 986 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
? header->endPosition() : viewPos;
0-986
1182 int index = 0;-
1183 int modelIndex = visibleIndex;-
1184 while (index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 1380 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 57 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
57-1380
1185 FxViewItem *item = visibleItems.at(index);-
1186 if (item->endPosition() > startPos
item->endPosition() > startPosDescription
TRUEevaluated 929 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 451 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
451-929
1187 break;
executed 929 times by 4 tests: break;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
929
1188 if (item->index != -1
item->index != -1Description
TRUEevaluated 451 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-451
1189 modelIndex = item->index;
executed 451 times by 1 test: modelIndex = item->index;
Executed by:
  • tst_qquicklistview
451
1190 ++index;-
1191 }
executed 451 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
451
1192-
1193 QString newSection = currentSection;-
1194 if (index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 929 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 57 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
57-929
1195 newSection = visibleItems.at(index)->attached->section();
executed 929 times by 4 tests: newSection = visibleItems.at(index)->attached->section();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
929
1196 else-
1197 newSection = (*visibleItems.constBegin())->attached->section();
executed 57 times by 1 test: newSection = (*visibleItems.constBegin())->attached->section();
Executed by:
  • tst_qquicklistview
57
1198 if (newSection != currentSection
newSection != currentSectionDescription
TRUEevaluated 142 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 844 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
) {
142-844
1199 currentSection = newSection;-
1200 updateStickySections();-
1201 q->currentSectionChanged();-
1202 }
executed 142 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
142
1203-
1204 if (sectionCriteria->labelPositioning() & QQuickViewSection::NextLabelAtEnd
sectionCriteri...NextLabelAtEndDescription
TRUEevaluated 69 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 917 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
69-917
1205-
1206-
1207-
1208-
1209 QString lastSection = currentSection;-
1210 qreal endPos = hasStickyFooter()
hasStickyFooter()Description
TRUEnever evaluated
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tst_qquicklistview
? footer->position() : viewPos + size();
0-69
1211 if (nextSectionItem
nextSectionItemDescription
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !inlineSections
!inlineSectionsDescription
TRUEnever evaluated
FALSEevaluated 54 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-54
1212 endPos -= orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEnever evaluated
FALSEnever evaluated
? nextSectionItem->height() : nextSectionItem->width();
never executed: endPos -= orient == QQuickListView::Vertical ? nextSectionItem->height() : nextSectionItem->width();
0
1213 while (index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 994 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-994
1214 FxListItemSG *listItem = static_cast<FxListItemSG *>(visibleItems.at(index));-
1215 if (listItem->itemPosition() >= endPos
listItem->item...on() >= endPosDescription
TRUEevaluated 65 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 929 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
65-929
1216 break;
executed 65 times by 1 test: break;
Executed by:
  • tst_qquicklistview
65
1217 if (listItem->index != -1
listItem->index != -1Description
TRUEevaluated 736 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 193 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
193-736
1218 modelIndex = listItem->index;
executed 736 times by 1 test: modelIndex = listItem->index;
Executed by:
  • tst_qquicklistview
736
1219 lastSection = listItem->attached->section();-
1220 ++index;-
1221 }
executed 929 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
929
1222-
1223 if (lastVisibleSection != lastSection
lastVisibleSec...!= lastSectionDescription
TRUEevaluated 47 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
22-47
1224 nextSection = QString();-
1225 lastVisibleSection = lastSection;-
1226 for (int i = modelIndex; i < itemCount
i < itemCountDescription
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_qquicklistview
; ++i) {
13-104
1227 QString section = sectionAt(i);-
1228 if (section != lastSection
section != lastSectionDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
34-70
1229 nextSection = section;-
1230 updateStickySections();-
1231 break;
executed 34 times by 1 test: break;
Executed by:
  • tst_qquicklistview
34
1232 }-
1233 }
executed 70 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
70
1234 }
executed 47 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
47
1235 }
executed 69 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
69
1236}
executed 986 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
986
1237-
1238void QQuickListViewPrivate::initializeCurrentItem()-
1239{-
1240 QQuickItemViewPrivate::initializeCurrentItem();-
1241-
1242 if (currentItem
currentItemDescription
TRUEevaluated 3584 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-3584
1243 FxListItemSG *listItem = static_cast<FxListItemSG *>(currentItem);-
1244-
1245-
1246 FxViewItem *actualItem = visibleItem(currentIndex);-
1247 if (!actualItem
!actualItemDescription
TRUEevaluated 167 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 3417 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
167-3417
1248 if (currentIndex == visibleIndex - 1
currentIndex =...sibleIndex - 1Description
TRUEnever evaluated
FALSEevaluated 167 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& visibleItems.count()
visibleItems.count()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-167
1249-
1250 listItem->setPosition(visibleItems.constFirst()->position() - currentItem->size() - spacing);-
1251 }
never executed: end of block
else {
0
1252-
1253-
1254 listItem->setPosition(positionAt(currentIndex));-
1255 }
executed 167 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
167
1256 }-
1257-
1258 if (visibleItems.isEmpty()
visibleItems.isEmpty()Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3534 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
50-3534
1259 averageSize = listItem->size();
executed 50 times by 1 test: averageSize = listItem->size();
Executed by:
  • tst_qquicklistview
50
1260 }
executed 3584 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3584
1261}
executed 3584 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3584
1262-
1263void QQuickListViewPrivate::updateAverage()-
1264{-
1265 if (!visibleItems.count()
!visibleItems.count()Description
TRUEnever evaluated
FALSEevaluated 5566 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
0-5566
1266 return;
never executed: return;
0
1267 qreal sum = 0.0;-
1268 for (FxViewItem *item : qAsConst(visibleItems))-
1269 sum += item->size();
executed 70254 times by 10 tests: sum += item->size();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
70254
1270 averageSize = qRound(sum / visibleItems.count());-
1271}
executed 5566 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
5566
1272-
1273qreal QQuickListViewPrivate::headerSize() const-
1274{-
1275 return
executed 42252 times by 11 tests: return header ? header->size() : 0.0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
header ? header->size() : 0.0;
executed 42252 times by 11 tests: return header ? header->size() : 0.0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
42252
1276}-
1277-
1278qreal QQuickListViewPrivate::footerSize() const-
1279{-
1280 return
executed 33805 times by 11 tests: return footer ? footer->size() : 0.0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
footer ? footer->size() : 0.0;
executed 33805 times by 11 tests: return footer ? footer->size() : 0.0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
33805
1281}-
1282-
1283bool QQuickListViewPrivate::showHeaderForIndex(int index) const-
1284{-
1285 return
executed 6526 times by 10 tests: return index == 0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
index == 0;
executed 6526 times by 10 tests: return index == 0;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
6526
1286}-
1287-
1288bool QQuickListViewPrivate::showFooterForIndex(int index) const-
1289{-
1290 return
executed 2661 times by 3 tests: return model && index == model->count()-1;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
model && index == model->count()-1;
executed 2661 times by 3 tests: return model && index == model->count()-1;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
2661
1291}-
1292-
1293void QQuickListViewPrivate::updateFooter()-
1294{-
1295 QQuickListView * const q = q_func();-
1296 bool created = false;-
1297 if (!footer
!footerDescription
TRUEevaluated 10385 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1140 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
1140-10385
1298 QQuickItem *item = createComponentItem(footerComponent, 1.0);-
1299 if (!item
!itemDescription
TRUEevaluated 10241 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 144 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
144-10241
1300 return;
executed 10241 times by 11 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
10241
1301 footer = new FxListItemSG(item, q, true);-
1302 footer->trackGeometry(true);-
1303 created = true;-
1304 }
executed 144 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
144
1305-
1306 FxListItemSG *listItem = static_cast<FxListItemSG*>(footer);-
1307 if (footerPositioning == QQuickListView::OverlayFooter
footerPosition...:OverlayFooterDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1192 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
92-1192
1308 listItem->setPosition(isContentFlowReversed() ? -position() - footerSize() : position() + size() - footerSize());-
1309 }
executed 92 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 922 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 270 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
92-922
1310 if (footerPositioning == QQuickListView::PullBackFooter
footerPosition...PullBackFooterDescription
TRUEevaluated 684 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 238 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
238-684
1311 qreal viewPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 488 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -position() : position() + size();
196-488
1312 qreal clampedPos = qBound(originPosition() - footerSize() + size(), listItem->position(), lastPosition());-
1313 listItem->setPosition(qBound(viewPos - footerSize(), clampedPos, viewPos));-
1314 }
executed 684 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
684
1315 qreal endPos = lastPosition();-
1316 if (findLastVisibleIndex() == model->count()-1
findLastVisibl...del->count()-1Description
TRUEevaluated 188 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
50-188
1317 listItem->setPosition(endPos);-
1318 }
executed 188 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
else {
188
1319 qreal visiblePos = position() + q->height();-
1320 if (endPos <= visiblePos
endPos <= visiblePosDescription
TRUEnever evaluated
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| listItem->position() < endPos
listItem->position() < endPosDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-50
1321 listItem->setPosition(endPos);
executed 22 times by 1 test: listItem->setPosition(endPos);
Executed by:
  • tst_qquicklistview
22
1322 }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
50
1323 }-
1324 } else {-
1325 listItem->setPosition(visiblePos);-
1326 }
executed 270 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
270
1327-
1328 if (created
createdDescription
TRUEevaluated 144 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 1140 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
144-1140
1329 q->footerItemChanged();
executed 144 times by 2 tests: q->footerItemChanged();
Executed by:
  • tst_examples
  • tst_qquicklistview
144
1330}
executed 1284 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
1284
1331-
1332void QQuickListViewPrivate::updateHeader()-
1333{-
1334 QQuickListView * const q = q_func();-
1335 bool created = false;-
1336 if (!header
!headerDescription
TRUEevaluated 10332 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1079 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
1079-10332
1337 QQuickItem *item = createComponentItem(headerComponent, 1.0);-
1338 if (!item
!itemDescription
TRUEevaluated 10156 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
176-10156
1339 return;
executed 10156 times by 11 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
10156
1340 header = new FxListItemSG(item, q, true);-
1341 header->trackGeometry(true);-
1342 created = true;-
1343 }
executed 176 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
176
1344-
1345 FxListItemSG *listItem = static_cast<FxListItemSG*>(header);-
1346 if (headerPositioning == QQuickListView::OverlayHeader
headerPosition...:OverlayHeaderDescription
TRUEevaluated 128 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1127 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
128-1127
1347 listItem->setPosition(isContentFlowReversed() ? -position() - size() : position());-
1348 }
executed 128 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 717 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 410 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
128-717
1349 if (headerPositioning == QQuickListView::PullBackHeader
headerPosition...PullBackHeaderDescription
TRUEevaluated 502 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 215 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
215-502
1350 qreal viewPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 378 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -position() - size() : position();
124-378
1351 qreal clampedPos = qBound(originPosition() - headerSize(), listItem->position(), lastPosition() - headerSize() - size());-
1352 listItem->setPosition(qBound(viewPos - headerSize(), clampedPos, viewPos));-
1353 }
executed 502 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
502
1354 qreal startPos = originPosition();-
1355 if (visibleIndex == 0
visibleIndex == 0Description
TRUEevaluated 203 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
12-203
1356 listItem->setPosition(startPos - headerSize());-
1357 }
executed 203 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
else {
203
1358 if (position() <= startPos
position() <= startPosDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| listItem->position() > startPos - headerSize()
listItem->posi...- headerSize()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-12
1359 listItem->setPosition(startPos - headerSize());
executed 2 times by 1 test: listItem->setPosition(startPos - headerSize());
Executed by:
  • tst_qquicklistview
2
1360 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
12
1361 }-
1362 } else {-
1363 listItem->setPosition(-headerSize());-
1364 }
executed 410 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
410
1365-
1366 if (created
createdDescription
TRUEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 1079 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
176-1079
1367 q->headerItemChanged();
executed 176 times by 2 tests: q->headerItemChanged();
Executed by:
  • tst_examples
  • tst_qquicklistview
176
1368}
executed 1255 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
1255
1369-
1370bool QQuickListViewPrivate::hasStickyHeader() const-
1371{-
1372 return
executed 12278 times by 5 tests: return header && headerPositioning != QQuickListView::InlineHeader;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
header && headerPositioning != QQuickListView::InlineHeader;
executed 12278 times by 5 tests: return header && headerPositioning != QQuickListView::InlineHeader;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
12278
1373}-
1374-
1375bool QQuickListViewPrivate::hasStickyFooter() const-
1376{-
1377 return
executed 11361 times by 5 tests: return footer && footerPositioning != QQuickListView::InlineFooter;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
footer && footerPositioning != QQuickListView::InlineFooter;
executed 11361 times by 5 tests: return footer && footerPositioning != QQuickListView::InlineFooter;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
11361
1378}-
1379-
1380void QQuickListViewPrivate::itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change,-
1381 const QRectF &oldGeometry)-
1382{-
1383 QQuickListView * const q = q_func();-
1384-
1385 QQuickItemViewPrivate::itemGeometryChanged(item, change, oldGeometry);-
1386 if (!q->isComponentComplete()
!q->isComponentComplete()Description
TRUEevaluated 3412 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 80231 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
3412-80231
1387 return;
executed 3412 times by 8 tests: return;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
3412
1388-
1389 if (currentItem
currentItemDescription
TRUEevaluated 55640 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 24591 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& currentItem->item == item
currentItem->item == itemDescription
TRUEevaluated 2939 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 52701 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
2939-55640
1390 const bool contentFlowReversed = isContentFlowReversed();-
1391 const qreal pos = position();-
1392 const qreal sz = size();-
1393 const qreal from = contentFlowReversed
contentFlowReversedDescription
TRUEevaluated 74 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2865 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? -pos - displayMarginBeginning - sz : pos - displayMarginBeginning;
74-2865
1394 const qreal to = contentFlowReversed
contentFlowReversedDescription
TRUEevaluated 74 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2865 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? -pos + displayMarginEnd : pos + sz + displayMarginEnd;
74-2865
1395 QQuickItemPrivate::get(currentItem->item)->setCulled(currentItem->endPosition() < from || currentItem->position() > to);-
1396 }
executed 2939 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2939
1397-
1398 if (item != contentItem
item != contentItemDescription
TRUEevaluated 63911 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 16320 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& (!highlight
!highlightDescription
TRUEevaluated 22134 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 41777 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
|| item != highlight->item
item != highlight->itemDescription
TRUEevaluated 33974 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 7803 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)) {
7803-63911
1399 if ((orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 53530 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2578 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& change.heightChange()
change.heightChange()Description
TRUEevaluated 2865 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 50665 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
2578-53530
1400 || (orient == QQuickListView::Horizontal
orient == QQui...ew::HorizontalDescription
TRUEevaluated 2578 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 50665 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& change.widthChange()
change.widthChange()Description
TRUEevaluated 222 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 2356 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)) {
222-50665
1401-
1402-
1403-
1404 if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 3057 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& item == visibleItems.constFirst()->item
item == visibl...tFirst()->itemDescription
TRUEevaluated 126 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2931 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
30-3057
1405 FxListItemSG *listItem = static_cast<FxListItemSG*>(visibleItems.constFirst());-
1406 if (listItem->transitionScheduledOrRunning()
listItem->tran...ledOrRunning()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 110 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
16-110
1407 return;
executed 16 times by 1 test: return;
Executed by:
  • tst_qquicklistview
16
1408 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-106
1409 const qreal oldItemEndPosition = verticalLayoutDirection == QQuickItemView::BottomToTop
verticalLayout...w::BottomToTopDescription
TRUEnever evaluated
FALSEevaluated 106 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -oldGeometry.y() : oldGeometry.y() + oldGeometry.height();
0-106
1410 const qreal heightDiff = item->height() - oldGeometry.height();-
1411 if (verticalLayoutDirection == QQuickListView::TopToBottom
verticalLayout...w::TopToBottomDescription
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& oldItemEndPosition < q->contentY()
oldItemEndPosi... q->contentY()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-106
1412 listItem->setPosition(listItem->position() - heightDiff, true);
executed 8 times by 1 test: listItem->setPosition(listItem->position() - heightDiff, true);
Executed by:
  • tst_qquicklistview
8
1413 else if (verticalLayoutDirection == QQuickListView::BottomToTop
verticalLayout...w::BottomToTopDescription
TRUEnever evaluated
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& oldItemEndPosition > q->contentY()
oldItemEndPosi... q->contentY()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-98
1414 listItem->setPosition(listItem->position() + heightDiff, true);
never executed: listItem->setPosition(listItem->position() + heightDiff, true);
0
1415 }
executed 106 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
106
1416 const qreal oldItemEndPosition = q->effectiveLayoutDirection() == Qt::RightToLeft
q->effectiveLa...t::RightToLeftDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -oldGeometry.x() : oldGeometry.x() + oldGeometry.width();
0-4
1417 const qreal widthDiff = item->width() - oldGeometry.width();-
1418 if (q->effectiveLayoutDirection() == Qt::LeftToRight
q->effectiveLa...t::LeftToRightDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& oldItemEndPosition < q->contentX()
oldItemEndPosi... q->contentX()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-4
1419 listItem->setPosition(listItem->position() - widthDiff, true);
executed 4 times by 1 test: listItem->setPosition(listItem->position() - widthDiff, true);
Executed by:
  • tst_qquicklistview
4
1420 else if (q->effectiveLayoutDirection() == Qt::RightToLeft
q->effectiveLa...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldItemEndPosition > q->contentX()
oldItemEndPosi... q->contentX()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1421 listItem->setPosition(listItem->position() + widthDiff, true);
never executed: listItem->setPosition(listItem->position() + widthDiff, true);
0
1422 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
4
1423 }-
1424 forceLayoutPolish();-
1425 }
executed 3071 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3071
1426 }
executed 56092 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
56092
1427}
executed 80215 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
80215
1428-
1429void QQuickListViewPrivate::fixupPosition()-
1430{-
1431 if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 5117 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 686 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
686-5117
1432 fixupY();
executed 5117 times by 10 tests: fixupY();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
5117
1433 else-
1434 fixupX();
executed 686 times by 2 tests: fixupX();
Executed by:
  • tst_examples
  • tst_qquicklistview
686
1435}-
1436-
1437void QQuickListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)-
1438{-
1439 if (orient == QQuickListView::Horizontal
orient == QQui...ew::HorizontalDescription
TRUEevaluated 1474 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 11081 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& &data == &vData
&data == &vDataDescription
TRUEevaluated 190 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 1284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
190-11081
1440 if (flickableDirection != QQuickFlickable::HorizontalFlick
flickableDirec...orizontalFlickDescription
TRUEnever evaluated
FALSEevaluated 190 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
0-190
1441 QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);
never executed: QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);
0
1442 return;
executed 190 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquicklistview
190
1443 } else if (orient == QQuickListView::Vertical
orient == QQui...View::VerticalDescription
TRUEevaluated 11081 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& &data == &hData
&data == &hDataDescription
TRUEevaluated 352 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 10729 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
352-11081
1444 if (flickableDirection != QQuickFlickable::VerticalFlick
flickableDirec...:VerticalFlickDescription
TRUEnever evaluated
FALSEevaluated 352 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
0-352
1445 QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);
never executed: QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);
0
1446 return;
executed 352 times by 4 tests: return;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
352
1447 }-
1448-
1449 correctFlick = false;-
1450 fixupMode = moveReason == Mouse
moveReason == MouseDescription
TRUEevaluated 317 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 11696 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? fixupMode : Immediate;
317-11696
1451 bool strictHighlightRange = haveHighlightRange
haveHighlightRangeDescription
TRUEevaluated 585 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 11428 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& highlightRange == QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEevaluated 537 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 48 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
;
48-11428
1452-
1453 qreal viewPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 1146 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 10867 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
? -position()-size() : position();
1146-10867
1454-
1455 if (snapMode != QQuickListView::NoSnap
snapMode != QQ...stView::NoSnapDescription
TRUEevaluated 945 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 11068 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& moveReason != QQuickListViewPrivate::SetIndex
moveReason != ...vate::SetIndexDescription
TRUEevaluated 867 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 78 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
78-11068
1456 qreal tempPosition = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 330 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 537 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
? -position()-size() : position();
330-537
1457 if (snapMode == QQuickListView::SnapOneItem
snapMode == QQ...w::SnapOneItemDescription
TRUEevaluated 321 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 546 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& moveReason == Mouse
moveReason == MouseDescription
TRUEevaluated 121 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 200 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
121-546
1458-
1459 qreal dist = data.move.value() - data.pressPos;-
1460 qreal bias = 0;-
1461 if (data.velocity > 0
data.velocity > 0Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& dist > 30
dist > 30Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& dist < averageSize/2
dist < averageSize/2Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 49 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-61
1462 bias = averageSize/2;
executed 12 times by 1 test: bias = averageSize/2;
Executed by:
  • tst_qquicklistview
12
1463 else if (data.velocity < 0
data.velocity < 0Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 49 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& dist < -30
dist < -30Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& dist > -averageSize/2
dist > -averageSize/2Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-60
1464 bias = -averageSize/2;
executed 12 times by 1 test: bias = -averageSize/2;
Executed by:
  • tst_qquicklistview
12
1465 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 73 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
48-73
1466 bias = -bias;
executed 48 times by 1 test: bias = -bias;
Executed by:
  • tst_qquicklistview
48
1467 tempPosition -= bias;-
1468 }
executed 121 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
121
1469 FxViewItem *topItem = snapItemAt(tempPosition+highlightRangeStart);-
1470 if (strictHighlightRange
strictHighlightRangeDescription
TRUEevaluated 391 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 476 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& currentItem
currentItemDescription
TRUEevaluated 233 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 158 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& (!topItem
!topItemDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 232 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
|| (topItem->index != currentIndex
topItem->index != currentIndexDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 194 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& fixupMode == Immediate
fixupMode == ImmediateDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
))) {
1-476
1471-
1472 updateHighlight();-
1473 topItem = currentItem;-
1474 }
executed 27 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
27
1475 FxViewItem *bottomItem = snapItemAt(tempPosition+highlightRangeEnd);-
1476 if (strictHighlightRange
strictHighlightRangeDescription
TRUEevaluated 391 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 476 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& currentItem
currentItemDescription
TRUEevaluated 233 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 158 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& (!bottomItem
!bottomItemDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 214 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
|| (bottomItem->index != currentIndex
bottomItem->in...= currentIndexDescription
TRUEevaluated 168 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& fixupMode == Immediate
fixupMode == ImmediateDescription
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquicklistview
))) {
19-476
1477-
1478 updateHighlight();-
1479 bottomItem = currentItem;-
1480 }
executed 103 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
103
1481 qreal pos;-
1482 bool isInBounds = -
-position() > maxExtentDescription
TRUEevaluated 633 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 234 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
position() > maxExtent
-position() > maxExtentDescription
TRUEevaluated 633 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 234 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& -
-position() <= minExtentDescription
TRUEevaluated 562 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 71 times by 1 test
Evaluated by:
  • tst_qquicklistview
position() <= minExtent
-position() <= minExtentDescription
TRUEevaluated 562 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 71 times by 1 test
Evaluated by:
  • tst_qquicklistview
;
71-633
1483 if (topItem
topItemDescription
TRUEevaluated 461 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 406 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& (isInBounds
isInBoundsDescription
TRUEevaluated 350 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 111 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| strictHighlightRange
strictHighlightRangeDescription
TRUEevaluated 57 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 54 times by 1 test
Evaluated by:
  • tst_qquicklistview
)) {
54-461
1484 if (topItem->index == 0
topItem->index == 0Description
TRUEevaluated 227 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 180 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& header
headerDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 211 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& tempPosition+highlightRangeStart < header->position()+header->size()/2
tempPosition+h...ader->size()/2Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !strictHighlightRange
!strictHighlightRangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-227
1485 pos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEnever evaluated
FALSEnever evaluated
? - header->position() + highlightRangeStart - size() : header->position() - highlightRangeStart;
0
1486 }
never executed: end of block
else {
0
1487 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 168 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 239 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
168-239
1488 pos = qMax(qMin(-topItem->position() + highlightRangeStart - size(), -maxExtent), -minExtent);
executed 168 times by 1 test: pos = qMax(qMin(-topItem->position() + highlightRangeStart - size(), -maxExtent), -minExtent);
Executed by:
  • tst_qquicklistview
168
1489 else-
1490 pos = qMax(qMin(topItem->position() - highlightRangeStart, -maxExtent), -minExtent);
executed 239 times by 2 tests: pos = qMax(qMin(topItem->position() - highlightRangeStart, -maxExtent), -minExtent);
Executed by:
  • tst_examples
  • tst_qquicklistview
239
1491 }-
1492 } else if (bottomItem
bottomItemDescription
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 398 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& isInBounds
isInBoundsDescription
TRUEnever evaluated
FALSEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-398
1493 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1494 pos = qMax(qMin(-bottomItem->position() + highlightRangeEnd - size(), -maxExtent), -minExtent);
never executed: pos = qMax(qMin(-bottomItem->position() + highlightRangeEnd - size(), -maxExtent), -minExtent);
0
1495 else-
1496 pos = qMax(qMin(bottomItem->position() - highlightRangeEnd, -maxExtent), -minExtent);
never executed: pos = qMax(qMin(bottomItem->position() - highlightRangeEnd, -maxExtent), -minExtent);
0
1497 } else {-
1498 QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);-
1499 return;
executed 460 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquicklistview
460
1500 }-
1501-
1502 qreal dist = qAbs(data.move + pos);-
1503 if (dist > 0
dist > 0Description
TRUEevaluated 239 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 168 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
168-239
1504 timeline.reset(data.move);-
1505 if (fixupMode != Immediate
fixupMode != ImmediateDescription
TRUEevaluated 145 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
94-145
1506 timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);-
1507 data.fixingUp = true;-
1508 }
executed 145 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
145
1509 timeline.set(data.move, -pos);-
1510 }
executed 94 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
94
1511 vTime = timeline.time();-
1512 }
executed 239 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
239
1513 }
executed 407 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
else if (currentItem
currentItemDescription
TRUEevaluated 6934 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4212 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& strictHighlightRange
strictHighlightRangeDescription
TRUEevaluated 78 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 6856 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& moveReason != QQuickListViewPrivate::SetIndex
moveReason != ...vate::SetIndexDescription
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
2-6934
1514 updateHighlight();-
1515 qreal pos = static_cast<FxListItemSG*>(currentItem)->itemPosition();-
1516 if (viewPos < pos + static_cast<FxListItemSG*>(currentItem)->itemSize() - highlightRangeEnd
viewPos < pos ...hlightRangeEndDescription
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
12-64
1517 viewPos = pos + static_cast<FxListItemSG*>(currentItem)->itemSize() - highlightRangeEnd;
executed 64 times by 2 tests: viewPos = pos + static_cast<FxListItemSG*>(currentItem)->itemSize() - highlightRangeEnd;
Executed by:
  • tst_examples
  • tst_qquicklistview
64
1518 if (viewPos > pos - highlightRangeStart
viewPos > pos ...ightRangeStartDescription
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEnever evaluated
)
0-76
1519 viewPos = pos - highlightRangeStart;
executed 76 times by 2 tests: viewPos = pos - highlightRangeStart;
Executed by:
  • tst_examples
  • tst_qquicklistview
76
1520 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
10-66
1521 viewPos = -viewPos-size();
executed 10 times by 1 test: viewPos = -viewPos-size();
Executed by:
  • tst_qquicklistview
10
1522-
1523 timeline.reset(data.move);-
1524 if (viewPos != position()
viewPos != position()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
16-60
1525 if (fixupMode != Immediate
fixupMode != ImmediateDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
2-14
1526 timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);-
1527 data.fixingUp = true;-
1528 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
2
1529 timeline.set(data.move, -viewPos);-
1530 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
14
1531 }-
1532 vTime = timeline.time();-
1533 }
executed 76 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
else {
76
1534 QQuickItemViewPrivate::fixup(data, minExtent, maxExtent);-
1535 }
executed 11070 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
11070
1536 data.inOvershoot = false;-
1537 fixupMode = Normal;-
1538}
executed 11553 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
11553
1539-
1540bool QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,-
1541 QQuickTimeLineCallback::Callback fixupCallback, qreal velocity)-
1542{-
1543 data.fixingUp = false;-
1544 moveReason = Mouse;-
1545 if ((!haveHighlightRange
!haveHighlightRangeDescription
TRUEevaluated 1097 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1002 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| highlightRange != QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEnever evaluated
FALSEevaluated 1002 times by 1 test
Evaluated by:
  • tst_qquicklistview
) && snapMode == QQuickListView::NoSnap
snapMode == QQ...stView::NoSnapDescription
TRUEevaluated 51 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-1097
1546 correctFlick = true;-
1547 return
executed 51 times by 1 test: return QQuickItemViewPrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
Executed by:
  • tst_qquicklistview
QQuickItemViewPrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
executed 51 times by 1 test: return QQuickItemViewPrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
Executed by:
  • tst_qquicklistview
51
1548 }-
1549 qreal maxDistance = 0;-
1550 qreal dataValue = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 1000 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1048 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -data.move.value()+size() : data.move.value();
1000-1048
1551-
1552-
1553 if (velocity > 0
velocity > 0Description
TRUEevaluated 1006 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1042 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
1006-1042
1554 if (data.move.value() < minExtent
data.move.value() < minExtentDescription
TRUEevaluated 992 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
14-992
1555 if (snapMode == QQuickListView::SnapOneItem
snapMode == QQ...w::SnapOneItemDescription
TRUEevaluated 212 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 780 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !hData.flicking
!hData.flickingDescription
TRUEevaluated 130 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !vData.flicking
!vData.flickingDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
48-780
1556-
1557 qreal dist = data.move.value() - data.pressPos;-
1558 qreal bias = dist < averageSize/2
dist < averageSize/2Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
? averageSize/2 : 0;
0-48
1559 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
24
1560 bias = -bias;
executed 24 times by 1 test: bias = -bias;
Executed by:
  • tst_qquicklistview
24
1561 data.flickTarget = -snapPosAt(-(dataValue - highlightRangeStart) - bias) + highlightRangeStart;-
1562 maxDistance = qAbs(data.flickTarget - data.move.value());-
1563 velocity = maxVelocity;-
1564 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
48
1565 maxDistance = qAbs(minExtent - data.move.value());-
1566 }
executed 944 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
944
1567 }-
1568 if (snapMode == QQuickListView::NoSnap
snapMode == QQ...stView::NoSnapDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1002 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& highlightRange != QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-1002
1569 data.flickTarget = minExtent;
never executed: data.flickTarget = minExtent;
0
1570 }
executed 1006 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
1006
1571 if (data.move.value() > maxExtent
data.move.value() > maxExtentDescription
TRUEevaluated 1026 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
16-1026
1572 if (snapMode == QQuickListView::SnapOneItem
snapMode == QQ...w::SnapOneItemDescription
TRUEevaluated 215 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 811 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !hData.flicking
!hData.flickingDescription
TRUEevaluated 134 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 81 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !vData.flicking
!vData.flickingDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
48-811
1573-
1574 qreal dist = data.move.value() - data.pressPos;-
1575 qreal bias = -
-dist < averageSize/2Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
dist < averageSize/2
-dist < averageSize/2Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
? averageSize/2 : 0;
0-48
1576 if (isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
24
1577 bias = -bias;
executed 24 times by 1 test: bias = -bias;
Executed by:
  • tst_qquicklistview
24
1578 data.flickTarget = -snapPosAt(-(dataValue - highlightRangeStart) + bias) + highlightRangeStart;-
1579 maxDistance = qAbs(data.flickTarget - data.move.value());-
1580 velocity = -maxVelocity;-
1581 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
48
1582 maxDistance = qAbs(maxExtent - data.move.value());-
1583 }
executed 978 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
978
1584 }-
1585 if (snapMode == QQuickListView::NoSnap
snapMode == QQ...stView::NoSnapDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1038 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& highlightRange != QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-1038
1586 data.flickTarget = maxExtent;
never executed: data.flickTarget = maxExtent;
0
1587 }
executed 1042 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
1042
1588 bool overShoot = boundsBehavior & QQuickFlickable::OvershootBounds;-
1589 if (maxDistance > 0
maxDistance > 0Description
TRUEevaluated 2018 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| overShoot
overShootDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-2018
1590-
1591-
1592-
1593-
1594 qreal v = velocity;-
1595 if (maxVelocity != -1
maxVelocity != -1Description
TRUEevaluated 2048 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& maxVelocity < qAbs(v)
maxVelocity < qAbs(v)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2045 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-2048
1596 if (v < 0
v < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qquicklistview
)
1-2
1597 v = -maxVelocity;
executed 2 times by 1 test: v = -maxVelocity;
Executed by:
  • tst_qquicklistview
2
1598 else-
1599 v = maxVelocity;
executed 1 time by 1 test: v = maxVelocity;
Executed by:
  • tst_qquicklistview
1
1600 }-
1601 if (!hData.flicking
!hData.flickingDescription
TRUEevaluated 1113 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 935 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !vData.flicking
!vData.flickingDescription
TRUEevaluated 210 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 903 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
210-1113
1602-
1603 qreal accel = deceleration;-
1604 qreal v2 = v * v;-
1605 overshootDist = 0.0;-
1606-
1607 qreal dist = v2 / (accel * 2.0) + averageSize/4;-
1608 if (maxDistance > 0
maxDistance > 0Description
TRUEevaluated 180 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
30-180
1609 dist = qMin(dist, maxDistance);
executed 180 times by 1 test: dist = qMin(dist, maxDistance);
Executed by:
  • tst_qquicklistview
180
1610 if (v > 0
v > 0Description
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 108 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
102-108
1611 dist = -dist;
executed 102 times by 1 test: dist = -dist;
Executed by:
  • tst_qquicklistview
102
1612 if ((maxDistance > 0.0
maxDistance > 0.0Description
TRUEevaluated 180 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& v2 / (2.0f * maxDistance) < accel
v2 / (2.0f * m...tance) < accelDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 114 times by 1 test
Evaluated by:
  • tst_qquicklistview
) || snapMode == QQuickListView::SnapOneItem
snapMode == QQ...w::SnapOneItemDescription
TRUEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
30-180
1613 if (snapMode != QQuickListView::SnapOneItem
snapMode != QQ...w::SnapOneItemDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
66-98
1614 qreal distTemp = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -dist : dist;
32-34
1615 data.flickTarget = -snapPosAt(-(dataValue - highlightRangeStart) + distTemp) + highlightRangeStart;-
1616 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
66
1617 data.flickTarget = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -data.flickTarget+size() : data.flickTarget;
80-84
1618 if (overShoot
overShootDescription
TRUEevaluated 164 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-164
1619 if (data.flickTarget > minExtent
data.flickTarget > minExtentDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 154 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
10-154
1620 overshootDist = overShootDistance(vSize);-
1621 data.flickTarget += overshootDist;-
1622 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (data.flickTarget < maxExtent
data.flickTarget < maxExtentDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 146 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
8-146
1623 overshootDist = overShootDistance(vSize);-
1624 data.flickTarget -= overshootDist;-
1625 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
8
1626 }
executed 164 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
164
1627 qreal adjDist = -data.flickTarget + data.move.value();-
1628 if (qAbs(adjDist) > qAbs(dist)
qAbs(adjDist) > qAbs(dist)Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 149 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
15-149
1629-
1630 qreal adjv2 = accel * 2.0f * qAbs(adjDist);-
1631 if (adjv2 > v2
adjv2 > v2Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
7-8
1632 v2 = adjv2;-
1633 v = qSqrt(v2);-
1634 if (dist > 0
dist > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
2-5
1635 v = -v;
executed 2 times by 1 test: v = -v;
Executed by:
  • tst_qquicklistview
2
1636 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
7
1637 }
executed 15 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
15
1638 dist = adjDist;-
1639 accel = v2 / (2.0f * qAbs(dist));-
1640 }
executed 164 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (overShoot
overShootDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-164
1641 data.flickTarget = data.move.value() - dist;-
1642 if (data.flickTarget > minExtent
data.flickTarget > minExtentDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
12-34
1643 overshootDist = overShootDistance(vSize);-
1644 data.flickTarget += overshootDist;-
1645 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (data.flickTarget < maxExtent
data.flickTarget < maxExtentDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
12-18
1646 overshootDist = overShootDistance(vSize);-
1647 data.flickTarget -= overshootDist;-
1648 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
16
1649 }
executed 46 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
46
1650 timeline.reset(data.move);-
1651 timeline.accel(data.move, v, accel, maxDistance + overshootDist);-
1652 timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this));-
1653 correctFlick = true;-
1654 return
executed 210 times by 1 test: return true;
Executed by:
  • tst_qquicklistview
true;
executed 210 times by 1 test: return true;
Executed by:
  • tst_qquicklistview
210
1655 } else {-
1656-
1657 qreal newtarget = data.flickTarget;-
1658 if (snapMode != QQuickListView::NoSnap
snapMode != QQ...stView::NoSnapDescription
TRUEevaluated 1838 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
|| highlightRange == QQuickListView::StrictlyEnforceRange
highlightRange...lyEnforceRangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-1838
1659 qreal tempFlickTarget = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 934 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -data.flickTarget+size() : data.flickTarget;
904-934
1660 newtarget = -snapPosAt(-(tempFlickTarget - highlightRangeStart)) + highlightRangeStart;-
1661 newtarget = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 934 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -newtarget+size() : newtarget;
904-934
1662 }
executed 1838 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
1838
1663 if (velocity < 0
velocity < 0Description
TRUEevaluated 934 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 904 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& newtarget <= maxExtent
newtarget <= maxExtentDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 922 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
12-934
1664 newtarget = maxExtent - overshootDist;
executed 12 times by 1 test: newtarget = maxExtent - overshootDist;
Executed by:
  • tst_qquicklistview
12
1665 else if (velocity > 0
velocity > 0Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 922 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& newtarget >= minExtent
newtarget >= minExtentDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 891 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
13-922
1666 newtarget = minExtent + overshootDist;
executed 13 times by 1 test: newtarget = minExtent + overshootDist;
Executed by:
  • tst_qquicklistview
13
1667 if (newtarget == data.flickTarget
newtarget == data.flickTargetDescription
TRUEevaluated 1822 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
16-1822
1668 if (qAbs(velocity) < MinimumFlickVelocity
qAbs(velocity)...mFlickVelocityDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1729 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
93-1729
1669 correctFlick = false;
executed 93 times by 1 test: correctFlick = false;
Executed by:
  • tst_qquicklistview
93
1670 return
executed 1822 times by 1 test: return false;
Executed by:
  • tst_qquicklistview
false;
executed 1822 times by 1 test: return false;
Executed by:
  • tst_qquicklistview
1822
1671 }-
1672 data.flickTarget = newtarget;-
1673 qreal dist = -newtarget + data.move.value();-
1674 if ((v < 0
v < 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& dist < 0
dist < 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
) || (v > 0
v > 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& dist > 0
dist > 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
)) {
0-8
1675 correctFlick = false;-
1676 timeline.reset(data.move);-
1677 fixup(data, minExtent, maxExtent);-
1678 return
never executed: return false;
false;
never executed: return false;
0
1679 }-
1680 timeline.reset(data.move);-
1681 timeline.accelDistance(data.move, v, -dist);-
1682 timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this));-
1683 return
executed 16 times by 1 test: return false;
Executed by:
  • tst_qquicklistview
false;
executed 16 times by 1 test: return false;
Executed by:
  • tst_qquicklistview
16
1684 }-
1685 } else {-
1686 correctFlick = false;-
1687 timeline.reset(data.move);-
1688 fixup(data, minExtent, maxExtent);-
1689 return
never executed: return false;
false;
never executed: return false;
0
1690 }-
1691}-
1692QQuickListView::QQuickListView(QQuickItem *parent)-
1693 : QQuickItemView(*(new QQuickListViewPrivate), parent)-
1694{-
1695}
executed 1920 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1920
1696-
1697QQuickListView::~QQuickListView()-
1698{-
1699}-
1700void QQuickListView::setHighlightFollowsCurrentItem(bool autoHighlight)-
1701{-
1702 QQuickListViewPrivate * const d = d_func();-
1703 if (d->autoHighlight != autoHighlight
d->autoHighlig... autoHighlightDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
10-12
1704 if (!autoHighlight
!autoHighlightDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEnever evaluated
) {
0-12
1705 if (d->highlightPosAnimator
d->highlightPosAnimatorDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
4-8
1706 d->highlightPosAnimator->stop();
executed 4 times by 1 test: d->highlightPosAnimator->stop();
Executed by:
  • tst_qquicklistview
4
1707 if (d->highlightWidthAnimator
d->highlightWidthAnimatorDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
4-8
1708 d->highlightWidthAnimator->stop();
executed 4 times by 1 test: d->highlightWidthAnimator->stop();
Executed by:
  • tst_qquicklistview
4
1709 if (d->highlightHeightAnimator
d->highlightHeightAnimatorDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
4-8
1710 d->highlightHeightAnimator->stop();
executed 4 times by 1 test: d->highlightHeightAnimator->stop();
Executed by:
  • tst_qquicklistview
4
1711 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
12
1712 QQuickItemView::setHighlightFollowsCurrentItem(autoHighlight);-
1713 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
12
1714}
executed 22 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
22
1715qreal QQuickListView::spacing() const-
1716{-
1717 const QQuickListViewPrivate * const d = d_func();-
1718 return
executed 8 times by 1 test: return d->spacing;
Executed by:
  • tst_qquicklistview
d->spacing;
executed 8 times by 1 test: return d->spacing;
Executed by:
  • tst_qquicklistview
8
1719}-
1720-
1721void QQuickListView::setSpacing(qreal spacing)-
1722{-
1723 QQuickListViewPrivate * const d = d_func();-
1724 if (spacing != d->spacing
spacing != d->spacingDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEnever evaluated
) {
0-22
1725 d->spacing = spacing;-
1726 d->forceLayoutPolish();-
1727 spacingChanged();-
1728 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
22
1729}
executed 22 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
22
1730QQuickListView::Orientation QQuickListView::orientation() const-
1731{-
1732 const QQuickListViewPrivate * const d = d_func();-
1733 return
executed 982477 times by 10 tests: return d->orient;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
d->orient;
executed 982477 times by 10 tests: return d->orient;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
982477
1734}-
1735-
1736void QQuickListView::setOrientation(QQuickListView::Orientation orientation)-
1737{-
1738 QQuickListViewPrivate * const d = d_func();-
1739 if (d->orient != orientation
d->orient != orientationDescription
TRUEevaluated 194 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 136 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
136-194
1740 d->orient = orientation;-
1741 if (d->orient == Vertical
d->orient == VerticalDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 170 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
24-170
1742 if (d->flickableDirection == HorizontalFlick
d->flickableDi...orizontalFlickDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-24
1743 setFlickableDirection(VerticalFlick);-
1744 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-24
1745 setContentWidth(-1);
executed 24 times by 1 test: setContentWidth(-1);
Executed by:
  • tst_qquicklistview
24
1746 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
24
1747 setContentX(0);-
1748 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
24
1749 if (d->flickableDirection == VerticalFlick
d->flickableDi... VerticalFlickDescription
TRUEevaluated 168 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
2-168
1750 setFlickableDirection(HorizontalFlick);-
1751 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 148 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
20-148
1752 setContentHeight(-1);
executed 20 times by 1 test: setContentHeight(-1);
Executed by:
  • tst_qquicklistview
20
1753 }
executed 168 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
168
1754 setContentY(0);-
1755 }
executed 170 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
170
1756 d->regenerate(true);-
1757 orientationChanged();-
1758 }
executed 194 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
194
1759}
executed 330 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
330
1760QQuickViewSection *QQuickListView::sectionCriteria()-
1761{-
1762 QQuickListViewPrivate * const d = d_func();-
1763 if (!d->sectionCriteria
!d->sectionCriteriaDescription
TRUEevaluated 46 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
6-46
1764 d->sectionCriteria = new QQuickViewSection(this);
executed 46 times by 4 tests: d->sectionCriteria = new QQuickViewSection(this);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
46
1765 return
executed 52 times by 4 tests: return d->sectionCriteria;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
d->sectionCriteria;
executed 52 times by 4 tests: return d->sectionCriteria;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
52
1766}-
1767-
1768-
1769-
1770-
1771-
1772QString QQuickListView::currentSection() const-
1773{-
1774 const QQuickListViewPrivate * const d = d_func();-
1775 return
executed 56 times by 1 test: return d->currentSection;
Executed by:
  • tst_qquicklistview
d->currentSection;
executed 56 times by 1 test: return d->currentSection;
Executed by:
  • tst_qquicklistview
56
1776}-
1777qreal QQuickListView::highlightMoveVelocity() const-
1778{-
1779 const QQuickListViewPrivate * const d = d_func();-
1780 return
executed 16 times by 1 test: return d->highlightMoveVelocity;
Executed by:
  • tst_qquicklistview
d->highlightMoveVelocity;
executed 16 times by 1 test: return d->highlightMoveVelocity;
Executed by:
  • tst_qquicklistview
16
1781}-
1782-
1783void QQuickListView::setHighlightMoveVelocity(qreal speed)-
1784{-
1785 QQuickListViewPrivate * const d = d_func();-
1786 if (d->highlightMoveVelocity != speed
d->highlightMo...ocity != speedDescription
TRUEevaluated 582 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
6-582
1787 d->highlightMoveVelocity = speed;-
1788 if (d->highlightPosAnimator
d->highlightPosAnimatorDescription
TRUEnever evaluated
FALSEevaluated 582 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-582
1789 d->highlightPosAnimator->velocity = d->highlightMoveVelocity;
never executed: d->highlightPosAnimator->velocity = d->highlightMoveVelocity;
0
1790 highlightMoveVelocityChanged();-
1791 }
executed 582 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
582
1792}
executed 588 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
588
1793-
1794void QQuickListView::setHighlightMoveDuration(int duration)-
1795{-
1796 QQuickListViewPrivate * const d = d_func();-
1797 if (d->highlightMoveDuration != duration
d->highlightMo...on != durationDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
2-6
1798 if (d->highlightPosAnimator
d->highlightPosAnimatorDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-2
1799 d->highlightPosAnimator->userDuration = duration;
executed 2 times by 1 test: d->highlightPosAnimator->userDuration = duration;
Executed by:
  • tst_qquicklistview
2
1800 QQuickItemView::setHighlightMoveDuration(duration);-
1801 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
1802}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
8
1803-
1804qreal QQuickListView::highlightResizeVelocity() const-
1805{-
1806 const QQuickListViewPrivate * const d = d_func();-
1807 return
executed 16 times by 1 test: return d->highlightResizeVelocity;
Executed by:
  • tst_qquicklistview
d->highlightResizeVelocity;
executed 16 times by 1 test: return d->highlightResizeVelocity;
Executed by:
  • tst_qquicklistview
16
1808}-
1809-
1810void QQuickListView::setHighlightResizeVelocity(qreal speed)-
1811{-
1812 QQuickListViewPrivate * const d = d_func();-
1813 if (d->highlightResizeVelocity != speed
d->highlightRe...ocity != speedDescription
TRUEevaluated 566 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-566
1814 d->highlightResizeVelocity = speed;-
1815 if (d->highlightWidthAnimator
d->highlightWidthAnimatorDescription
TRUEnever evaluated
FALSEevaluated 566 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-566
1816 d->highlightWidthAnimator->velocity = d->highlightResizeVelocity;
never executed: d->highlightWidthAnimator->velocity = d->highlightResizeVelocity;
0
1817 if (d->highlightHeightAnimator
d->highlightHeightAnimatorDescription
TRUEnever evaluated
FALSEevaluated 566 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-566
1818 d->highlightHeightAnimator->velocity = d->highlightResizeVelocity;
never executed: d->highlightHeightAnimator->velocity = d->highlightResizeVelocity;
0
1819 highlightResizeVelocityChanged();-
1820 }
executed 566 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
566
1821}
executed 566 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
566
1822-
1823int QQuickListView::highlightResizeDuration() const-
1824{-
1825 const QQuickListViewPrivate * const d = d_func();-
1826 return
never executed: return d->highlightResizeDuration;
d->highlightResizeDuration;
never executed: return d->highlightResizeDuration;
0
1827}-
1828-
1829void QQuickListView::setHighlightResizeDuration(int duration)-
1830{-
1831 QQuickListViewPrivate * const d = d_func();-
1832 if (d->highlightResizeDuration != duration
d->highlightRe...on != durationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1833 d->highlightResizeDuration = duration;-
1834 if (d->highlightWidthAnimator
d->highlightWidthAnimatorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1835 d->highlightWidthAnimator->userDuration = d->highlightResizeDuration;
never executed: d->highlightWidthAnimator->userDuration = d->highlightResizeDuration;
0
1836 if (d->highlightHeightAnimator
d->highlightHeightAnimatorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1837 d->highlightHeightAnimator->userDuration = d->highlightResizeDuration;
never executed: d->highlightHeightAnimator->userDuration = d->highlightResizeDuration;
0
1838 highlightResizeDurationChanged();-
1839 }
never executed: end of block
0
1840}
never executed: end of block
0
1841QQuickListView::SnapMode QQuickListView::snapMode() const-
1842{-
1843 const QQuickListViewPrivate * const d = d_func();-
1844 return
executed 16 times by 1 test: return d->snapMode;
Executed by:
  • tst_qquicklistview
d->snapMode;
executed 16 times by 1 test: return d->snapMode;
Executed by:
  • tst_qquicklistview
16
1845}-
1846-
1847void QQuickListView::setSnapMode(SnapMode mode)-
1848{-
1849 QQuickListViewPrivate * const d = d_func();-
1850 if (d->snapMode != mode
d->snapMode != modeDescription
TRUEevaluated 88 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-88
1851 d->snapMode = mode;-
1852 snapModeChanged();-
1853 d->fixupPosition();-
1854 }
executed 88 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
88
1855}
executed 92 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
92
1856QQuickListView::HeaderPositioning QQuickListView::headerPositioning() const-
1857{-
1858 const QQuickListViewPrivate * const d = d_func();-
1859 return
never executed: return d->headerPositioning;
d->headerPositioning;
never executed: return d->headerPositioning;
0
1860}-
1861-
1862void QQuickListView::setHeaderPositioning(QQuickListView::HeaderPositioning positioning)-
1863{-
1864 QQuickListViewPrivate * const d = d_func();-
1865 if (d->headerPositioning != positioning
d->headerPosit...!= positioningDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-86
1866 d->applyPendingChanges();-
1867 d->headerPositioning = positioning;-
1868 if (isComponentComplete()
isComponentComplete()Description
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-86
1869 d->updateHeader();-
1870 d->updateViewport();-
1871 d->fixupPosition();-
1872 }
never executed: end of block
0
1873 headerPositioningChanged();-
1874 }
executed 86 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
86
1875}
executed 86 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
86
1876QQuickListView::FooterPositioning QQuickListView::footerPositioning() const-
1877{-
1878 const QQuickListViewPrivate * const d = d_func();-
1879 return
never executed: return d->footerPositioning;
d->footerPositioning;
never executed: return d->footerPositioning;
0
1880}-
1881-
1882void QQuickListView::setFooterPositioning(QQuickListView::FooterPositioning positioning)-
1883{-
1884 QQuickListViewPrivate * const d = d_func();-
1885 if (d->footerPositioning != positioning
d->footerPosit...!= positioningDescription
TRUEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-82
1886 d->applyPendingChanges();-
1887 d->footerPositioning = positioning;-
1888 if (isComponentComplete()
isComponentComplete()Description
TRUEnever evaluated
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-82
1889 d->updateFooter();-
1890 d->updateViewport();-
1891 d->fixupPosition();-
1892 }
never executed: end of block
0
1893 footerPositioningChanged();-
1894 }
executed 82 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
82
1895}
executed 82 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
82
1896void QQuickListView::viewportMoved(Qt::Orientations orient)-
1897{-
1898 QQuickListViewPrivate * const d = d_func();-
1899 QQuickItemView::viewportMoved(orient);-
1900-
1901 if (!d->itemCount
!d->itemCountDescription
TRUEevaluated 562 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 9580 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
562-9580
1902 if (d->hasStickyHeader()
d->hasStickyHeader()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 476 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
86-476
1903 d->updateHeader();
executed 86 times by 1 test: d->updateHeader();
Executed by:
  • tst_qquicklistview
86
1904 if (d->hasStickyFooter()
d->hasStickyFooter()Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 500 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
62-500
1905 d->updateFooter();
executed 62 times by 1 test: d->updateFooter();
Executed by:
  • tst_qquicklistview
62
1906 return;
executed 562 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquicklistview
562
1907 }-
1908-
1909-
1910 if (d->inViewportMoved
d->inViewportMovedDescription
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 9553 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
)
27-9553
1911 return;
executed 27 times by 1 test: return;
Executed by:
  • tst_qquicklistview
27
1912 d->inViewportMoved = true;-
1913-
1914 if (yflick()
yflick()Description
TRUEevaluated 6169 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 3384 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
3384-6169
1915 if (d->isBottomToTop()
d->isBottomToTop()Description
TRUEevaluated 1566 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4603 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
)
1566-4603
1916 d->bufferMode = d->vData.smoothVelocity < 0
d->vData.smoothVelocity < 0Description
TRUEevaluated 709 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 857 times by 1 test
Evaluated by:
  • tst_qquicklistview
? QQuickListViewPrivate::BufferAfter : QQuickListViewPrivate::BufferBefore;
executed 1566 times by 1 test: d->bufferMode = d->vData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferAfter : QQuickListViewPrivate::BufferBefore;
Executed by:
  • tst_qquicklistview
709-1566
1917 else-
1918 d->bufferMode = d->vData.smoothVelocity < 0
d->vData.smoothVelocity < 0Description
TRUEevaluated 1423 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 3180 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
executed 4603 times by 5 tests: d->bufferMode = d->vData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
1423-4603
1919 } else {-
1920 if (d->isRightToLeft()
d->isRightToLeft()Description
TRUEevaluated 1533 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1851 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
1533-1851
1921 d->bufferMode = d->hData.smoothVelocity < 0
d->hData.smoothVelocity < 0Description
TRUEevaluated 710 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 823 times by 1 test
Evaluated by:
  • tst_qquicklistview
? QQuickListViewPrivate::BufferAfter : QQuickListViewPrivate::BufferBefore;
executed 1533 times by 1 test: d->bufferMode = d->hData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferAfter : QQuickListViewPrivate::BufferBefore;
Executed by:
  • tst_qquicklistview
710-1533
1922 else-
1923 d->bufferMode = d->hData.smoothVelocity < 0
d->hData.smoothVelocity < 0Description
TRUEevaluated 744 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1107 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
executed 1851 times by 2 tests: d->bufferMode = d->hData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
Executed by:
  • tst_examples
  • tst_qquicklistview
744-1851
1924 }-
1925-
1926 d->refillOrLayout();-
1927-
1928-
1929 qreal from = d->isContentFlowReversed()
d->isContentFlowReversed()Description
TRUEevaluated 3099 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6454 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
? -d->position()-d->displayMarginBeginning-d->size() : d->position()-d->displayMarginBeginning;
3099-6454
1930 qreal to = d->isContentFlowReversed()
d->isContentFlowReversed()Description
TRUEevaluated 3099 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6454 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
? -d->position()+d->displayMarginEnd : d->position()+d->size()+d->displayMarginEnd;
3099-6454
1931 for (FxViewItem *item : qAsConst(d->visibleItems)) {-
1932 if (item->item
item->itemDescription
TRUEevaluated 87351 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-87351
1933 QQuickItemPrivate::get(item->item)->setCulled(item->endPosition() < from || item->position() > to);
executed 87351 times by 5 tests: QQuickItemPrivate::get(item->item)->setCulled(item->endPosition() < from || item->position() > to);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
87351
1934 }
executed 87351 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
87351
1935 if (d->currentItem
d->currentItemDescription
TRUEevaluated 9513 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
40-9513
1936 QQuickItemPrivate::get(d->currentItem->item)->setCulled(d->currentItem->endPosition() < from || d->currentItem->position() > to);
executed 9513 times by 5 tests: QQuickItemPrivate::get(d->currentItem->item)->setCulled(d->currentItem->endPosition() < from || d->currentItem->position() > to);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
9513
1937-
1938 if (d->hData.flicking
d->hData.flickingDescription
TRUEevaluated 2759 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6794 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
|| d->vData.flicking
d->vData.flickingDescription
TRUEevaluated 3358 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3436 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
|| d->hData.moving
d->hData.movingDescription
TRUEevaluated 306 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3130 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
|| d->vData.moving
d->vData.movingDescription
TRUEevaluated 969 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2161 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
)
306-6794
1939 d->moveReason = QQuickListViewPrivate::Mouse;
executed 7392 times by 1 test: d->moveReason = QQuickListViewPrivate::Mouse;
Executed by:
  • tst_qquicklistview
7392
1940 if (d->moveReason != QQuickListViewPrivate::SetIndex
d->moveReason ...vate::SetIndexDescription
TRUEevaluated 8484 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 1069 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
1069-8484
1941 if (d->haveHighlightRange
d->haveHighlightRangeDescription
TRUEevaluated 2987 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 5497 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
&& d->highlightRange == StrictlyEnforceRange
d->highlightRa...lyEnforceRangeDescription
TRUEevaluated 2987 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& d->highlight
d->highlightDescription
TRUEevaluated 2947 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
0-5497
1942-
1943 qreal pos = d->highlight->position();-
1944 qreal viewPos = d->isContentFlowReversed()
d->isContentFlowReversed()Description
TRUEevaluated 1217 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1730 times by 1 test
Evaluated by:
  • tst_qquicklistview
? -d->position()-d->size() : d->position();
1217-1730
1945 if (pos > viewPos + d->highlightRangeEnd - d->highlight->size()
pos > viewPos ...hlight->size()Description
TRUEevaluated 1542 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1405 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
1405-1542
1946 pos = viewPos + d->highlightRangeEnd - d->highlight->size();
executed 1542 times by 1 test: pos = viewPos + d->highlightRangeEnd - d->highlight->size();
Executed by:
  • tst_qquicklistview
1542
1947 if (pos < viewPos + d->highlightRangeStart
pos < viewPos ...ightRangeStartDescription
TRUEevaluated 1684 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1263 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
1263-1684
1948 pos = viewPos + d->highlightRangeStart;
executed 1684 times by 1 test: pos = viewPos + d->highlightRangeStart;
Executed by:
  • tst_qquicklistview
1684
1949 if (pos != d->highlight->position()
pos != d->high...ht->position()Description
TRUEevaluated 2885 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
62-2885
1950 d->highlightPosAnimator->stop();-
1951 static_cast<FxListItemSG*>(d->highlight)->setPosition(pos);-
1952 }
executed 2885 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
2885
1953 d->updateHighlight();-
1954 }
executed 62 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
62
1955-
1956-
1957 if (FxViewItem *snapItem = d->snapItemAt(d->highlight->position())
FxViewItem *sn...t->position())Description
TRUEevaluated 2739 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 208 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
208-2739
1958 if (snapItem->index >= 0
snapItem->index >= 0Description
TRUEevaluated 2739 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& snapItem->index != d->currentIndex
snapItem->inde...->currentIndexDescription
TRUEevaluated 234 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2505 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-2739
1959 d->updateCurrent(snapItem->index);
executed 234 times by 1 test: d->updateCurrent(snapItem->index);
Executed by:
  • tst_qquicklistview
234
1960 }
executed 2739 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2739
1961 }
executed 2947 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2947
1962 }
executed 8484 times by 4 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
8484
1963-
1964 if ((d->hData.flicking
d->hData.flickingDescription
TRUEevaluated 2759 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 6794 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
|| d->vData.flicking
d->vData.flickingDescription
TRUEevaluated 3358 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3436 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) && d->correctFlick
d->correctFlickDescription
TRUEevaluated 2861 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3256 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->inFlickCorrection
!d->inFlickCorrectionDescription
TRUEevaluated 2861 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-6794
1965 d->inFlickCorrection = true;-
1966-
1967-
1968 if (yflick()
yflick()Description
TRUEevaluated 1576 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->vData.inOvershoot
!d->vData.inOvershootDescription
TRUEevaluated 1434 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
142-1576
1969 if (d->vData.velocity > 0
d->vData.velocity > 0Description
TRUEevaluated 635 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 799 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
635-799
1970 const qreal minY = minYExtent();-
1971 if ((minY - d->vData.move.value() < height()/2
minY - d->vDat...) < height()/2Description
TRUEevaluated 209 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 426 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->vData.flickTarget - d->vData.move.value() < height()/2
d->vData.flick...) < height()/2Description
TRUEevaluated 372 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 54 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
54-426
1972 && minY != d->vData.flickTarget
minY != d->vData.flickTargetDescription
TRUEevaluated 451 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 130 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
130-451
1973 d->flickY(-d->vData.smoothVelocity.value());
executed 451 times by 1 test: d->flickY(-d->vData.smoothVelocity.value());
Executed by:
  • tst_qquicklistview
451
1974 }
executed 635 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (d->vData.velocity < 0
d->vData.velocity < 0Description
TRUEevaluated 799 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-799
1975 const qreal maxY = maxYExtent();-
1976 if ((d->vData.move.value() - maxY < height()/2
d->vData.move....Y < height()/2Description
TRUEevaluated 280 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 519 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->vData.move.value() - d->vData.flickTarget < height()/2
d->vData.move....t < height()/2Description
TRUEevaluated 398 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 121 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
121-519
1977 && maxY != d->vData.flickTarget
maxY != d->vData.flickTargetDescription
TRUEevaluated 481 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 197 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
197-481
1978 d->flickY(-d->vData.smoothVelocity.value());
executed 481 times by 1 test: d->flickY(-d->vData.smoothVelocity.value());
Executed by:
  • tst_qquicklistview
481
1979 }
executed 799 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
799
1980 }
executed 1434 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
1434
1981-
1982 if (xflick()
xflick()Description
TRUEevaluated 1285 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1576 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->hData.inOvershoot
!d->hData.inOvershootDescription
TRUEevaluated 1203 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
82-1576
1983 if (d->hData.velocity > 0
d->hData.velocity > 0Description
TRUEevaluated 601 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 602 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
601-602
1984 const qreal minX = minXExtent();-
1985 if ((minX - d->hData.move.value() < width()/2
minX - d->hDat...() < width()/2Description
TRUEevaluated 201 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 400 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->hData.flickTarget - d->hData.move.value() < width()/2
d->hData.flick...() < width()/2Description
TRUEevaluated 372 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
28-400
1986 && minX != d->hData.flickTarget
minX != d->hData.flickTargetDescription
TRUEevaluated 453 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
120-453
1987 d->flickX(-d->hData.smoothVelocity.value());
executed 453 times by 1 test: d->flickX(-d->hData.smoothVelocity.value());
Executed by:
  • tst_qquicklistview
453
1988 }
executed 601 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (d->hData.velocity < 0
d->hData.velocity < 0Description
TRUEevaluated 602 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-602
1989 const qreal maxX = maxXExtent();-
1990 if ((d->hData.move.value() - maxX < width()/2
d->hData.move....xX < width()/2Description
TRUEevaluated 200 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 402 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->hData.move.value() - d->hData.flickTarget < width()/2
d->hData.move....et < width()/2Description
TRUEevaluated 374 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
28-402
1991 && maxX != d->hData.flickTarget
maxX != d->hData.flickTargetDescription
TRUEevaluated 454 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
120-454
1992 d->flickX(-d->hData.smoothVelocity.value());
executed 454 times by 1 test: d->flickX(-d->hData.smoothVelocity.value());
Executed by:
  • tst_qquicklistview
454
1993 }
executed 602 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
602
1994 }
executed 1203 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
1203
1995 d->inFlickCorrection = false;-
1996 }
executed 2861 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2861
1997 if (d->hasStickyHeader()
d->hasStickyHeader()Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 9367 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
)
186-9367
1998 d->updateHeader();
executed 186 times by 1 test: d->updateHeader();
Executed by:
  • tst_qquicklistview
186
1999 if (d->hasStickyFooter()
d->hasStickyFooter()Description
TRUEevaluated 222 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 9331 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
)
222-9331
2000 d->updateFooter();
executed 222 times by 1 test: d->updateFooter();
Executed by:
  • tst_qquicklistview
222
2001 if (d->sectionCriteria
d->sectionCriteriaDescription
TRUEevaluated 472 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 9081 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
) {
472-9081
2002 d->updateCurrentSection();-
2003 d->updateStickySections();-
2004 }
executed 472 times by 2 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
472
2005 d->inViewportMoved = false;-
2006}
executed 9553 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
9553
2007-
2008void QQuickListView::keyPressEvent(QKeyEvent *event)-
2009{-
2010 QQuickListViewPrivate * const d = d_func();-
2011 if (d->model && d->model->count()
d->model->count()Description
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& ((d->interactive
d->interactiveDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->explicitKeyNavigationEnabled
!d->explicitKe...igationEnabledDescription
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-90
2012 || (d->explicitKeyNavigationEnabled
d->explicitKey...igationEnabledDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& d->keyNavigationEnabled
d->keyNavigationEnabledDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
))) {
2-4
2013 if ((d->orient == QQuickListView::Horizontal
d->orient == Q...ew::HorizontalDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->isRightToLeft()
!d->isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
&& event->key() == Qt::Key_Left
event->key() == Qt::Key_LeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-86
2014 || (d->orient == QQuickListView::Horizontal
d->orient == Q...ew::HorizontalDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& d->isRightToLeft()
d->isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
&& event->key() == Qt::Key_Right
event->key() == Qt::Key_RightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-86
2015 || (d->orient == QQuickListView::Vertical
d->orient == Q...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& !d->isBottomToTop()
!d->isBottomToTop()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& event->key() == Qt::Key_Up
event->key() == Qt::Key_UpDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-86
2016 || (d->orient == QQuickListView::Vertical
d->orient == Q...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& d->isBottomToTop()
d->isBottomToTop()Description
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& event->key() == Qt::Key_Down
event->key() == Qt::Key_DownDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0-86
2017 if (currentIndex() > 0
currentIndex() > 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (d->wrap
d->wrapDescription
TRUEnever evaluated
FALSEnever evaluated
&& !event->isAutoRepeat()
!event->isAutoRepeat()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
2018 decrementCurrentIndex();-
2019 event->accept();-
2020 return;
never executed: return;
0
2021 } else if (d->wrap
d->wrapDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2022 event->accept();-
2023 return;
never executed: return;
0
2024 }-
2025 }
never executed: end of block
else if ((d->orient == QQuickListView::Horizontal
d->orient == Q...ew::HorizontalDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !d->isRightToLeft()
!d->isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
&& event->key() == Qt::Key_Right
event->key() == Qt::Key_RightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-86
2026 || (d->orient == QQuickListView::Horizontal
d->orient == Q...ew::HorizontalDescription
TRUEnever evaluated
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& d->isRightToLeft()
d->isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
&& event->key() == Qt::Key_Left
event->key() == Qt::Key_LeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-86
2027 || (d->orient == QQuickListView::Vertical
d->orient == Q...View::VerticalDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& !d->isBottomToTop()
!d->isBottomToTop()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& event->key() == Qt::Key_Down
event->key() == Qt::Key_DownDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-86
2028 || (d->orient == QQuickListView::Vertical
d->orient == Q...View::VerticalDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->isBottomToTop()
d->isBottomToTop()Description
TRUEnever evaluated
FALSEnever evaluated
&& event->key() == Qt::Key_Up
event->key() == Qt::Key_UpDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
2029 if (currentIndex() < d->model->count() - 1
currentIndex()...l->count() - 1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
|| (d->wrap
d->wrapDescription
TRUEnever evaluated
FALSEnever evaluated
&& !event->isAutoRepeat()
!event->isAutoRepeat()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0-86
2030 incrementCurrentIndex();-
2031 event->accept();-
2032 return;
executed 86 times by 1 test: return;
Executed by:
  • tst_qquicklistview
86
2033 } else if (d->wrap
d->wrapDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2034 event->accept();-
2035 return;
never executed: return;
0
2036 }-
2037 }
never executed: end of block
0
2038 }
never executed: end of block
0
2039 event->ignore();-
2040 QQuickItemView::keyPressEvent(event);-
2041}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
4
2042-
2043void QQuickListView::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)-
2044{-
2045 QQuickListViewPrivate * const d = d_func();-
2046 if (d->isRightToLeft()
d->isRightToLeft()Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4000 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
72-4000
2047-
2048 qreal dx = newGeometry.width() - oldGeometry.width();-
2049 setContentX(contentX() - dx);-
2050 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else if (d->isBottomToTop()
d->isBottomToTop()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3972 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
) {
28-3972
2051-
2052 qreal dy = newGeometry.height() - oldGeometry.height();-
2053 setContentY(contentY() - dy);-
2054 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
28
2055 QQuickItemView::geometryChanged(newGeometry, oldGeometry);-
2056}
executed 4072 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4072
2057-
2058void QQuickListView::initItem(int index, QObject *object)-
2059{-
2060 QQuickItemView::initItem(index, object);-
2061-
2062-
2063-
2064 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);-
2065 if (item
itemDescription
TRUEevaluated 29948 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-29948
2066 QQuickListViewAttached *attached = static_cast<QQuickListViewAttached *>(-
2067 qmlAttachedPropertiesObject<QQuickListView>(item));-
2068 if (attached
attachedDescription
TRUEevaluated 29948 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-29948
2069 attached->setView(this);
executed 29948 times by 10 tests: attached->setView(this);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
29948
2070 }
executed 29948 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
29948
2071}
executed 29948 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
29948
2072-
2073qreal QQuickListView::maxYExtent() const-
2074{-
2075 const QQuickListViewPrivate * const d = d_func();-
2076 if (d->layoutOrientation() == Qt::Horizontal
d->layoutOrien...Qt::HorizontalDescription
TRUEevaluated 5861 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 54514 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& d->flickableDirection != HorizontalFlick
d->flickableDi...orizontalFlickDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 5813 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
48-54514
2077 return
executed 48 times by 1 test: return QQuickFlickable::maxYExtent();
Executed by:
  • tst_qquicklistview
QQuickFlickable::maxYExtent();
executed 48 times by 1 test: return QQuickFlickable::maxYExtent();
Executed by:
  • tst_qquicklistview
48
2078 return
executed 60327 times by 11 tests: return QQuickItemView::maxYExtent();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
QQuickItemView::maxYExtent();
executed 60327 times by 11 tests: return QQuickItemView::maxYExtent();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
60327
2079}-
2080-
2081qreal QQuickListView::maxXExtent() const-
2082{-
2083 const QQuickListViewPrivate * const d = d_func();-
2084 if (d->layoutOrientation() == Qt::Vertical
d->layoutOrien...= Qt::VerticalDescription
TRUEevaluated 27304 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 16800 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
&& d->flickableDirection != VerticalFlick
d->flickableDi... VerticalFlickDescription
TRUEevaluated 80 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 27224 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
80-27304
2085 return
executed 80 times by 2 tests: return QQuickFlickable::maxXExtent();
Executed by:
  • tst_examples
  • tst_qquicklistview
QQuickFlickable::maxXExtent();
executed 80 times by 2 tests: return QQuickFlickable::maxXExtent();
Executed by:
  • tst_examples
  • tst_qquicklistview
80
2086 return
executed 44024 times by 11 tests: return QQuickItemView::maxXExtent();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
QQuickItemView::maxXExtent();
executed 44024 times by 11 tests: return QQuickItemView::maxXExtent();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
44024
2087}-
2088void QQuickListView::incrementCurrentIndex()-
2089{-
2090 QQuickListViewPrivate * const d = d_func();-
2091 int count = d->model
d->modelDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? d->model->count() : 0;
0-92
2092 if (count
countDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& (currentIndex() < count - 1
currentIndex() < count - 1Description
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->wrap
d->wrapDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)) {
0-92
2093 d->moveReason = QQuickListViewPrivate::SetIndex;-
2094 int index = currentIndex()+1;-
2095 setCurrentIndex((index >= 0 && index < count) ? index : 0);-
2096 }
executed 92 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
92
2097}
executed 92 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
92
2098void QQuickListView::decrementCurrentIndex()-
2099{-
2100 QQuickListViewPrivate * const d = d_func();-
2101 int count = d->model
d->modelDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
? d->model->count() : 0;
0-2
2102 if (count
countDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& (currentIndex() > 0
currentIndex() > 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
|| d->wrap
d->wrapDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)) {
0-2
2103 d->moveReason = QQuickListViewPrivate::SetIndex;-
2104 int index = currentIndex()-1;-
2105 setCurrentIndex((index >= 0 && index < count) ? index : count-1);-
2106 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
2107}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
2
2108-
2109void QQuickListViewPrivate::updateSectionCriteria()-
2110{-
2111 QQuickListView * const q = q_func();-
2112 if (q->isComponentComplete()
q->isComponentComplete()Description
TRUEevaluated 1994 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 48 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& model) {
48-1994
2113 QList<QByteArray> roles;-
2114 if (sectionCriteria
sectionCriteriaDescription
TRUEevaluated 64 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 1924 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& !sectionCriteria->property().isEmpty()
!sectionCriter...ty().isEmpty()Description
TRUEevaluated 64 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-1924
2115 roles << sectionCriteria->property().toUtf8();
executed 64 times by 4 tests: roles << sectionCriteria->property().toUtf8();
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
64
2116 model->setWatchedRoles(roles);-
2117 updateSections();-
2118 if (itemCount
itemCountDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 1972 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
16-1972
2119 forceLayoutPolish();
executed 16 times by 2 tests: forceLayoutPolish();
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
16
2120 }
executed 1988 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
1988
2121}
executed 2042 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
2042
2122-
2123bool QQuickListViewPrivate::applyInsertionChange(const QQmlChangeSet::Change &change, ChangeResult *insertResult, QList<FxViewItem *> *addedItems, QList<MovedItem> *movingIntoView)-
2124{-
2125 int modelIndex = change.index;-
2126 int count = change.count;-
2127-
2128 qreal tempPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 1155 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
? -position()-size() : position();
108-1155
2129 int index = visibleItems.count()
visibleItems.count()Description
TRUEevaluated 987 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 276 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
? mapFromModel(modelIndex) : 0;
276-987
2130 qreal lastVisiblePos = buffer + displayMarginEnd + tempPos + size();-
2131-
2132 if (index < 0
index < 0Description
TRUEevaluated 272 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 991 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
272-991
2133 int i = visibleItems.count() - 1;-
2134 while (i > 0
i > 0Description
TRUEevaluated 254 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& visibleItems.at(i)->index == -1
visibleItems.a...)->index == -1Description
TRUEnever evaluated
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
0-254
2135 --
never executed: --i;
i;
never executed: --i;
0
2136 if (i == 0
i == 0Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& visibleItems.constFirst()->index == -1
visibleItems.c...)->index == -1Description
TRUEnever evaluated
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
0-254
2137-
2138 index = visibleItems.count();-
2139 }
never executed: end of block
else if (visibleItems.at(i)->index + 1 == modelIndex
visibleItems.a... == modelIndexDescription
TRUEevaluated 207 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 65 times by 1 test
Evaluated by:
  • tst_qquicklistview
0-207
2140 && visibleItems.at(i)->endPosition() <= lastVisiblePos
visibleItems.a...lastVisiblePosDescription
TRUEevaluated 203 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
4-203
2141-
2142 index = visibleItems.count();-
2143 }
executed 203 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
else {
203
2144 if (modelIndex < visibleIndex
modelIndex < visibleIndexDescription
TRUEevaluated 45 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
24-45
2145-
2146 visibleIndex += count;-
2147 for (FxViewItem *item : qAsConst(visibleItems)) {-
2148 if (item->index != -1
item->index != -1Description
TRUEevaluated 670 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
&& item->index >= modelIndex
item->index >= modelIndexDescription
TRUEevaluated 670 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-670
2149 item->index += count;
executed 670 times by 1 test: item->index += count;
Executed by:
  • tst_qquicklistview
670
2150 }
executed 670 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
670
2151 }
executed 45 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
45
2152 return
executed 69 times by 1 test: return true;
Executed by:
  • tst_qquicklistview
true;
executed 69 times by 1 test: return true;
Executed by:
  • tst_qquicklistview
69
2153 }-
2154 }-
2155-
2156-
2157 qreal pos = 0;-
2158 if (visibleItems.count()
visibleItems.count()Description
TRUEevaluated 918 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 276 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
276-918
2159 pos = index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 715 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 203 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
? visibleItems.at(index)->position()
203-715
2160 : visibleItems.constLast()->endPosition() + spacing;-
2161 }
executed 918 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
918
2162-
2163-
2164 for (FxViewItem *item : qAsConst(visibleItems)) {-
2165 if (item->index != -1
item->index != -1Description
TRUEevaluated 10307 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& item->index >= modelIndex
item->index >= modelIndexDescription
TRUEevaluated 5520 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4787 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
0-10307
2166 item->index += count;-
2167 if (change.isMove()
change.isMove()Description
TRUEevaluated 2464 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 3056 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
2464-3056
2168 item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::MoveTransition, false);
executed 2464 times by 1 test: item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::MoveTransition, false);
Executed by:
  • tst_qquicklistview
2464
2169 else-
2170 item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, false);
executed 3056 times by 2 tests: item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, false);
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
3056
2171 }-
2172 }
executed 10307 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
10307
2173-
2174 bool visibleAffected = false;-
2175 if (insertResult->visiblePos.isValid()
insertResult->...ePos.isValid()Description
TRUEevaluated 952 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 242 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& pos < insertResult->visiblePos
pos < insertResult->visiblePosDescription
TRUEevaluated 49 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 903 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
49-952
2176-
2177 int insertionIdx = index;-
2178 int i = 0;-
2179 qreal from = tempPos - displayMarginBeginning - buffer;-
2180-
2181 if (insertionIdx < visibleIndex
insertionIdx < visibleIndexDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
19-30
2182 if (pos >= from
pos >= fromDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
7-12
2183-
2184 insertResult->sizeChangesBeforeVisiblePos += count * (averageSize + spacing);-
2185 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
7
2186 }
executed 19 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
19
2187 for (i = count-1; i >= 0
i >= 0Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& pos >= from
pos >= fromDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicklistview
; --i) {
10-38
2188-
2189 FxViewItem *item = nullptr;-
2190 if (change.isMove()
change.isMove()Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& (
(item = curren...elIndex + i)))Description
TRUEnever evaluated
FALSEnever evaluated
item = currentChanges.removedItems.take(change.moveKey(modelIndex + i)))
(item = curren...elIndex + i)))Description
TRUEnever evaluated
FALSEnever evaluated
)
0-18
2191 item->index = modelIndex + i;
never executed: item->index = modelIndex + i;
0
2192 if (!item
!itemDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-18
2193 item = createItem(modelIndex + i, QQmlIncubator::Synchronous);
executed 18 times by 1 test: item = createItem(modelIndex + i, QQmlIncubator::Synchronous);
Executed by:
  • tst_qquicklistview
18
2194 if (!item
!itemDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-18
2195 return
never executed: return false;
false;
never executed: return false;
0
2196-
2197 visibleAffected = true;-
2198 visibleItems.insert(insertionIdx, item);-
2199 if (insertionIdx == 0
insertionIdx == 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
9
2200 insertResult->changedFirstItem = true;
executed 9 times by 1 test: insertResult->changedFirstItem = true;
Executed by:
  • tst_qquicklistview
9
2201 if (!change.isMove()
!change.isMove()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-18
2202 addedItems->append(item);-
2203 if (transitioner
transitionerDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
0-18
2204 item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, true);
never executed: item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, true);
0
2205 else-
2206 static_cast<
executed 18 times by 1 test: static_cast<FxListItemSG *>(item)->setPosition(pos, true);
Executed by:
  • tst_qquicklistview
FxListItemSG *>(item)->setPosition(pos, true);
executed 18 times by 1 test: static_cast<FxListItemSG *>(item)->setPosition(pos, true);
Executed by:
  • tst_qquicklistview
18
2207 }-
2208 insertResult->sizeChangesBeforeVisiblePos += item->size() + spacing;-
2209 pos -= item->size() + spacing;-
2210 index++;-
2211 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
18
2212 }
executed 30 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
30
2213-
2214 int firstOkIdx = -1;-
2215 for (int i = 0; i <= insertionIdx
i <= insertionIdxDescription
TRUEevaluated 59 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& i < visibleItems.count() - 1
i < visibleItems.count() - 1Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicklistview
; i++) {
20-59
2216 if (visibleItems.at(i)->index + 1 != visibleItems.at(i + 1)->index
visibleItems.a...(i + 1)->indexDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 31 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
8-31
2217 firstOkIdx = i + 1;-
2218 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_qquicklistview
8
2219 }-
2220 }
executed 31 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
31
2221 for (int i = 0; i < firstOkIdx
i < firstOkIdxDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 49 times by 1 test
Evaluated by:
  • tst_qquicklistview
; i++) {
12-49
2222 FxViewItem *nvItem = visibleItems.takeFirst();-
2223 addedItems->removeOne(nvItem);-
2224 removeItem(nvItem);-
2225 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
12
2226-
2227 }
executed 49 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
49
2228 for (int i = 0; i < count
i < countDescription
TRUEevaluated 5011 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 950 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& pos <= lastVisiblePos
pos <= lastVisiblePosDescription
TRUEevaluated 4816 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 195 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
; ++i) {
195-5011
2229 visibleAffected = true;-
2230 FxViewItem *item = nullptr;-
2231 if (change.isMove()
change.isMove()Description
TRUEevaluated 574 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4242 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& (
(item = curren...elIndex + i)))Description
TRUEevaluated 432 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_qquicklistview
item = currentChanges.removedItems.take(change.moveKey(modelIndex + i)))
(item = curren...elIndex + i)))Description
TRUEevaluated 432 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
142-4242
2232 item->index = modelIndex + i;
executed 432 times by 1 test: item->index = modelIndex + i;
Executed by:
  • tst_qquicklistview
432
2233 bool newItem = !item;-
2234 if (!item
!itemDescription
TRUEevaluated 4384 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 432 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
432-4384
2235 item = createItem(modelIndex + i, QQmlIncubator::Synchronous);
executed 4384 times by 3 tests: item = createItem(modelIndex + i, QQmlIncubator::Synchronous);
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
4384
2236 if (!item
!itemDescription
TRUEnever evaluated
FALSEevaluated 4816 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
0-4816
2237 return
never executed: return false;
false;
never executed: return false;
0
2238-
2239 visibleItems.insert(index, item);-
2240 if (index == 0
index == 0Description
TRUEevaluated 499 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 4317 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
499-4317
2241 insertResult->changedFirstItem = true;
executed 499 times by 3 tests: insertResult->changedFirstItem = true;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
499
2242 if (change.isMove()
change.isMove()Description
TRUEevaluated 574 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 4242 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
574-4242
2243-
2244-
2245 if (newItem
newItemDescription
TRUEevaluated 142 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 432 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& transitioner
transitionerDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 110 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& transitioner->canTransition(QQuickItemViewTransitioner::MoveTransition, true)
transitioner->...nsition, true)Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-432
2246 movingIntoView->append(MovedItem(item, change.moveKey(item->index)));
executed 32 times by 1 test: movingIntoView->append(MovedItem(item, change.moveKey(item->index)));
Executed by:
  • tst_qquicklistview
32
2247 }
executed 574 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
else {
574
2248 addedItems->append(item);-
2249 if (transitioner
transitionerDescription
TRUEevaluated 228 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 4014 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
)
228-4014
2250 item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, true);
executed 228 times by 2 tests: item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::AddTransition, true);
Executed by:
  • tst_examples
  • tst_qquicklistview
228
2251 else-
2252 static_cast<
executed 4014 times by 3 tests: static_cast<FxListItemSG *>(item)->setPosition(pos, true);
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FxListItemSG *>(item)->setPosition(pos, true);
executed 4014 times by 3 tests: static_cast<FxListItemSG *>(item)->setPosition(pos, true);
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
4014
2253 }-
2254 insertResult->sizeChangesAfterVisiblePos += item->size() + spacing;-
2255 pos += item->size() + spacing;-
2256 ++index;-
2257 }
executed 4816 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
4816
2258-
2259 if (0 < index
0 < indexDescription
TRUEevaluated 1145 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& index < visibleItems.count()
index < visibleItems.count()Description
TRUEevaluated 686 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 459 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
0-1145
2260 FxViewItem *prevItem = visibleItems.at(index - 1);-
2261 FxViewItem *item = visibleItems.at(index);-
2262 if (prevItem->index != item->index - 1
prevItem->inde...tem->index - 1Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 663 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
) {
23-663
2263 int i = index;-
2264 qreal prevPos = prevItem->position();-
2265 while (i < visibleItems.count()
i < visibleItems.count()Description
TRUEevaluated 87 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_qquicklistview
) {
23-87
2266 FxListItemSG *nvItem = static_cast<FxListItemSG *>(visibleItems.takeLast());-
2267 insertResult->sizeChangesAfterVisiblePos -= nvItem->size() + spacing;-
2268 addedItems->removeOne(nvItem);-
2269 if (nvItem->transitionScheduledOrRunning()
nvItem->transi...ledOrRunning()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 85 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
2-85
2270 nvItem->setPosition(prevPos + (nvItem->index - prevItem->index) * averageSize);
executed 2 times by 1 test: nvItem->setPosition(prevPos + (nvItem->index - prevItem->index) * averageSize);
Executed by:
  • tst_qquicklistview
2
2271 removeItem(nvItem);-
2272 }
executed 87 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
87
2273 }
executed 23 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
23
2274 }
executed 686 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
686
2275 }
executed 1145 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1145
2276-
2277 updateVisibleIndex();-
2278-
2279 return
executed 1194 times by 3 tests: return visibleAffected;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
visibleAffected;
executed 1194 times by 3 tests: return visibleAffected;
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1194
2280}-
2281-
2282void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult)-
2283{-
2284 (void)insertionResult;;-
2285-
2286 if (!transitioner
!transitionerDescription
TRUEnever evaluated
FALSEevaluated 240 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
0-240
2287 return;
never executed: return;
0
2288-
2289 int markerItemIndex = -1;-
2290 for (int i=0; i<visibleItems.count()
i<visibleItems.count()Description
TRUEevaluated 4056 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEnever evaluated
; i++) {
0-4056
2291 if (visibleItems.at(i)->index == afterModelIndex
visibleItems.a...fterModelIndexDescription
TRUEevaluated 240 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
FALSEevaluated 3816 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
) {
240-3816
2292 markerItemIndex = i;-
2293 break;
executed 240 times by 2 tests: break;
Executed by:
  • tst_examples
  • tst_qquicklistview
240
2294 }-
2295 }
executed 3816 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
3816
2296 if (markerItemIndex < 0
markerItemIndex < 0Description
TRUEnever evaluated
FALSEevaluated 240 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
)
0-240
2297 return;
never executed: return;
0
2298-
2299 const qreal viewEndPos = isContentFlowReversed()
isContentFlowReversed()Description
TRUEnever evaluated
FALSEevaluated 240 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
? -position() : position() + size();
0-240
2300 qreal sizeRemoved = -removalResult.sizeChangesAfterVisiblePos-
2301 - (removalResult.countChangeAfterVisibleItems * (averageSize + spacing));-
2302-
2303 for (int i=markerItemIndex+1; i<visibleItems.count()
i<visibleItems.count()Description
TRUEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 138 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
; i++) {
120-138
2304 FxListItemSG *listItem = static_cast<FxListItemSG *>(visibleItems.at(i));-
2305 if (listItem->position() >= viewEndPos
listItem->posi... >= viewEndPosDescription
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
)
18-102
2306 break;
executed 102 times by 1 test: break;
Executed by:
  • tst_qquicklistview
102
2307 if (!listItem->transitionScheduledOrRunning()
!listItem->tra...ledOrRunning()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
) {
0-18
2308 qreal pos = listItem->position();-
2309 listItem->setPosition(pos - sizeRemoved);-
2310 listItem->transitionNextReposition(transitioner, QQuickItemViewTransitioner::RemoveTransition, false);-
2311 listItem->setPosition(pos);-
2312 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
18
2313 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
18
2314}
executed 240 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
240
2315QQuickListViewAttached *QQuickListView::qmlAttachedProperties(QObject *obj)-
2316{-
2317 return
executed 32708 times by 10 tests: return new QQuickListViewAttached(obj);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
new QQuickListViewAttached(obj);
executed 32708 times by 10 tests: return new QQuickListViewAttached(obj);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
32708
2318}-
2319-
2320-
2321-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0