OpenCoverage

qquickflickable.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickflickable.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qquickflickable_p.h"-
41#include "qquickflickable_p_p.h"-
42#include "qquickflickablebehavior_p.h"-
43#include "qquickwindow.h"-
44#include "qquickwindow_p.h"-
45#include "qquickevents_p_p.h"-
46-
47#include <QtQuick/private/qquickpointerhandler_p.h>-
48#include <QtQuick/private/qquicktransition_p.h>-
49#include <private/qqmlglobal_p.h>-
50-
51#include <QtQml/qqmlinfo.h>-
52#include <QtGui/qevent.h>-
53#include <QtGui/qguiapplication.h>-
54#include <QtGui/private/qguiapplication_p.h>-
55#include <QtGui/qstylehints.h>-
56#include <QtCore/qmath.h>-
57#include "qplatformdefs.h"-
58-
59#include <math.h>-
60#include <cmath>-
61-
62QT_BEGIN_NAMESPACE-
63-
64// FlickThreshold determines how far the "mouse" must have moved-
65// before we perform a flick.-
66static const int FlickThreshold = 15;-
67-
68// RetainGrabVelocity is the maxmimum instantaneous velocity that-
69// will ensure the Flickable retains the grab on consecutive flicks.-
70static const int RetainGrabVelocity = 100;-
71-
72#ifdef Q_OS_OSX-
73static const int MovementEndingTimerInterval = 100;-
74#endif-
75-
76// Currently std::round can't be used on Android when using ndk g++, so-
77// use C version instead. We could just define two versions of Round, one-
78// for float and one for double, but then only one of them would be used-
79// and compiler would trigger a warning about unused function.-
80//-
81// See https://code.google.com/p/android/issues/detail?id=54418-
82template<typename T>-
83static T Round(T t) {-
84 return round(t);
executed 3734 times by 9 tests: return round(t);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
3734
85}-
86template<>-
87Q_DECL_UNUSED float Round<float>(float f) {-
88 return roundf(f);
never executed: return roundf(f);
0
89}-
90-
91static qreal EaseOvershoot(qreal t) {-
92 return qAtan(t);
never executed: return qAtan(t);
0
93}-
94-
95QQuickFlickableVisibleArea::QQuickFlickableVisibleArea(QQuickFlickable *parent)-
96 : QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)-
97 , m_yPosition(0.), m_heightRatio(0.)-
98{-
99}
executed 566 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
566
100-
101qreal QQuickFlickableVisibleArea::widthRatio() const-
102{-
103 return m_widthRatio;
executed 18 times by 2 tests: return m_widthRatio;
Executed by:
  • tst_examples
  • tst_qquickflickable
18
104}-
105-
106qreal QQuickFlickableVisibleArea::xPosition() const-
107{-
108 return m_xPosition;
executed 8 times by 1 test: return m_xPosition;
Executed by:
  • tst_examples
8
109}-
110-
111qreal QQuickFlickableVisibleArea::heightRatio() const-
112{-
113 return m_heightRatio;
executed 2324 times by 3 tests: return m_heightRatio;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
2324
114}-
115-
116qreal QQuickFlickableVisibleArea::yPosition() const-
117{-
118 return m_yPosition;
executed 18 times by 1 test: return m_yPosition;
Executed by:
  • tst_examples
18
119}-
120-
121void QQuickFlickableVisibleArea::updateVisible()-
122{-
123 QQuickFlickablePrivate *p = QQuickFlickablePrivate::get(flickable);-
124-
125 bool changeX = false;-
126 bool changeY = false;-
127 bool changeWidth = false;-
128 bool changeHeight = false;-
129-
130 // Vertical-
131 const qreal viewheight = flickable->height();-
132 const qreal maxyextent = -flickable->maxYExtent() + flickable->minYExtent();-
133 qreal pagePos = (-p->vData.move.value() + flickable->minYExtent()) / (maxyextent + viewheight);-
134 qreal pageSize = viewheight / (maxyextent + viewheight);-
135-
136 if (pageSize != m_heightRatio) {
pageSize != m_heightRatioDescription
TRUEevaluated 2318 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 2483 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
2318-2483
137 m_heightRatio = pageSize;-
138 changeHeight = true;-
139 }
executed 2318 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
2318
140 if (pagePos != m_yPosition) {
pagePos != m_yPositionDescription
TRUEevaluated 946 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 3855 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
946-3855
141 m_yPosition = pagePos;-
142 changeY = true;-
143 }
executed 946 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
946
144-
145 // Horizontal-
146 const qreal viewwidth = flickable->width();-
147 const qreal maxxextent = -flickable->maxXExtent() + flickable->minXExtent();-
148 pagePos = (-p->hData.move.value() + flickable->minXExtent()) / (maxxextent + viewwidth);-
149 pageSize = viewwidth / (maxxextent + viewwidth);-
150-
151 if (pageSize != m_widthRatio) {
pageSize != m_widthRatioDescription
TRUEevaluated 584 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 4217 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
584-4217
152 m_widthRatio = pageSize;-
153 changeWidth = true;-
154 }
executed 584 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
584
155 if (pagePos != m_xPosition) {
pagePos != m_xPositionDescription
TRUEevaluated 4787 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickflickable
14-4787
156 m_xPosition = pagePos;-
157 changeX = true;-
158 }
executed 4787 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
4787
159-
160 if (changeX)
changeXDescription
TRUEevaluated 4787 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickflickable
14-4787
161 emit xPositionChanged(m_xPosition);
executed 4787 times by 3 tests: xPositionChanged(m_xPosition);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
4787
162 if (changeY)
changeYDescription
TRUEevaluated 946 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 3855 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
946-3855
163 emit yPositionChanged(m_yPosition);
executed 946 times by 3 tests: yPositionChanged(m_yPosition);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
946
164 if (changeWidth)
changeWidthDescription
TRUEevaluated 584 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 4217 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
584-4217
165 emit widthRatioChanged(m_widthRatio);
executed 584 times by 3 tests: widthRatioChanged(m_widthRatio);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
584
166 if (changeHeight)
changeHeightDescription
TRUEevaluated 2318 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 2483 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
2318-2483
167 emit heightRatioChanged(m_heightRatio);
executed 2318 times by 3 tests: heightRatioChanged(m_heightRatio);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
2318
168}
executed 4801 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
4801
169-
170-
171class QQuickFlickableReboundTransition : public QQuickTransitionManager-
172{-
173public:-
174 QQuickFlickableReboundTransition(QQuickFlickable *f, const QString &name)-
175 : flickable(f), axisData(nullptr), propName(name), active(false)-
176 {-
177 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
8
178-
179 ~QQuickFlickableReboundTransition()-
180 {-
181 flickable = nullptr;-
182 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
8
183-
184 bool startTransition(QQuickFlickablePrivate::AxisData *data, qreal toPos) {-
185 QQuickFlickablePrivate *fp = QQuickFlickablePrivate::get(flickable);-
186 if (!fp->rebound || !fp->rebound->enabled())
!fp->reboundDescription
TRUEnever evaluated
FALSEnever evaluated
!fp->rebound->enabled()Description
TRUEnever evaluated
FALSEnever evaluated
0
187 return false;
never executed: return false;
0
188 active = true;-
189 axisData = data;-
190 axisData->transitionTo = toPos;-
191 axisData->transitionToSet = true;-
192-
193 actions.clear();-
194 actions << QQuickStateAction(fp->contentItem, propName, toPos);-
195 QQuickTransitionManager::transition(actions, fp->rebound, fp->contentItem);-
196 return true;
never executed: return true;
0
197 }-
198-
199 bool isActive() const {-
200 return active;
never executed: return active;
0
201 }-
202-
203 void stopTransition() {-
204 if (!flickable || !isRunning())
!flickableDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
!isRunning()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEnever evaluated
0-4
205 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickflickable
4
206 QQuickFlickablePrivate *fp = QQuickFlickablePrivate::get(flickable);-
207 if (axisData == &fp->hData)
axisData == &fp->hDataDescription
TRUEnever evaluated
FALSEnever evaluated
0
208 axisData->move.setValue(-flickable->contentX());
never executed: axisData->move.setValue(-flickable->contentX());
0
209 else-
210 axisData->move.setValue(-flickable->contentY());
never executed: axisData->move.setValue(-flickable->contentY());
0
211 cancel();-
212 active = false;-
213 }
never executed: end of block
0
214-
215protected:-
216 void finished() override {-
217 if (!flickable)
!flickableDescription
TRUEnever evaluated
FALSEnever evaluated
0
218 return;
never executed: return;
0
219 axisData->move.setValue(axisData->transitionTo);-
220 QQuickFlickablePrivate *fp = QQuickFlickablePrivate::get(flickable);-
221 active = false;-
222-
223 if (!fp->hData.transitionToBounds->isActive()
!fp->hData.tra...ds->isActive()Description
TRUEnever evaluated
FALSEnever evaluated
0
224 && !fp->vData.transitionToBounds->isActive()) {
!fp->vData.tra...ds->isActive()Description
TRUEnever evaluated
FALSEnever evaluated
0
225 flickable->movementEnding();-
226 }
never executed: end of block
0
227 }
never executed: end of block
0
228-
229private:-
230 QQuickStateOperation::ActionList actions;-
231 QQuickFlickable *flickable;-
232 QQuickFlickablePrivate::AxisData *axisData;-
233 QString propName;-
234 bool active;-
235};-
236-
237QQuickFlickablePrivate::AxisData::~AxisData()-
238{-
239 delete transitionToBounds;-
240}
executed 8184 times by 16 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
8184
241-
242-
243QQuickFlickablePrivate::QQuickFlickablePrivate()-
244 : contentItem(new QQuickItem)-
245 , hData(this, &QQuickFlickablePrivate::setViewportX)-
246 , vData(this, &QQuickFlickablePrivate::setViewportY)-
247 , hMoved(false), vMoved(false)-
248 , stealMouse(false), pressed(false)-
249 , scrollingPhase(false), interactive(true), calcVelocity(false)-
250 , pixelAligned(false)-
251 , lastPosTime(-1)-
252 , lastPressTime(0)-
253 , deceleration(QML_FLICK_DEFAULTDECELERATION)-
254 , maxVelocity(QML_FLICK_DEFAULTMAXVELOCITY), reportedVelocitySmoothing(100)-
255 , delayedPressEvent(nullptr), pressDelay(0), fixupDuration(400)-
256 , flickBoost(1.0), fixupMode(Normal), vTime(0), visibleArea(nullptr)-
257 , flickableDirection(QQuickFlickable::AutoFlickDirection)-
258 , boundsBehavior(QQuickFlickable::DragAndOvershootBounds)-
259 , boundsMovement(QQuickFlickable::FollowBoundsBehavior)-
260 , rebound(nullptr)-
261{-
262}
executed 4100 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4100
263-
264void QQuickFlickablePrivate::init()-
265{-
266 Q_Q(QQuickFlickable);-
267 QQml_setParent_noEvent(contentItem, q);-
268 contentItem->setParentItem(q);-
269 qmlobject_connect(&timeline, QQuickTimeLine, SIGNAL(completed()),
executed 36 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
executed 36 times by 18 tests: methodIdx = QQuickFlickable::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
never executed: methodIdx = QQuickFlickable::staticMetaObject.indexOfSignal(method+1);
signalIdx < 0Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 4064 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
methodIdx < 0Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 4064 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
code == 1Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEnever evaluated
0-4064
270 q, QQuickFlickable, SLOT(timelineCompleted()))-
271 qmlobject_connect(&velocityTimeline, QQuickTimeLine, SIGNAL(completed()),
executed 36 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
executed 36 times by 18 tests: methodIdx = QQuickFlickable::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
never executed: methodIdx = QQuickFlickable::staticMetaObject.indexOfSignal(method+1);
signalIdx < 0Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 4064 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
methodIdx < 0Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 4064 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
code == 1Description
TRUEevaluated 36 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEnever evaluated
0-4064
272 q, QQuickFlickable, SLOT(velocityTimelineCompleted()))-
273 q->setAcceptedMouseButtons(Qt::LeftButton);-
274 q->setAcceptTouchEvents(false); // rely on mouse events synthesized from touch-
275 q->setFiltersChildMouseEvents(true);-
276 QQuickItemPrivate *viewportPrivate = QQuickItemPrivate::get(contentItem);-
277 viewportPrivate->addItemChangeListener(this, QQuickItemPrivate::Geometry);-
278}
executed 4100 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4100
279-
280/*-
281 Returns the amount to overshoot by given a velocity.-
282 Will be roughly in range 0 - size/4-
283*/-
284qreal QQuickFlickablePrivate::overShootDistance(qreal size) const-
285{-
286 if (maxVelocity <= 0)
maxVelocity <= 0Description
TRUEnever evaluated
FALSEevaluated 346 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-346
287 return 0.0;
never executed: return 0.0;
0
288-
289 return qMin(qreal(QML_FLICK_OVERSHOOT), size/3);
executed 346 times by 7 tests: return qMin(qreal(150), size/3);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
346
290}-
291-
292void QQuickFlickablePrivate::AxisData::addVelocitySample(qreal v, qreal maxVelocity)-
293{-
294 if (v > maxVelocity)
v > maxVelocityDescription
TRUEevaluated 501 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 4869 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
501-4869
295 v = maxVelocity;
executed 501 times by 6 tests: v = maxVelocity;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
501
296 else if (v < -maxVelocity)
v < -maxVelocityDescription
TRUEevaluated 518 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 4351 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
518-4351
297 v = -maxVelocity;
executed 518 times by 3 tests: v = -maxVelocity;
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
518
298 velocityBuffer.append(v);-
299 if (velocityBuffer.count() > QML_FLICK_SAMPLEBUFFER)
velocityBuffer.count() > 3Description
TRUEevaluated 2866 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 2504 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
2504-2866
300 velocityBuffer.remove(0);
executed 2866 times by 7 tests: velocityBuffer.remove(0);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
2866
301}
executed 5370 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
5370
302-
303void QQuickFlickablePrivate::AxisData::updateVelocity()-
304{-
305 velocity = 0;-
306 if (velocityBuffer.count() > QML_FLICK_DISCARDSAMPLES) {
velocityBuffer.count() > 0Description
TRUEevaluated 840 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 700 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
700-840
307 int count = velocityBuffer.count()-QML_FLICK_DISCARDSAMPLES;-
308 for (int i = 0; i < count; ++i) {
i < countDescription
TRUEevaluated 2326 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 840 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
840-2326
309 qreal v = velocityBuffer.at(i);-
310 velocity += v;-
311 }
executed 2326 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
2326
312 velocity /= count;-
313 }
executed 840 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
840
314}
executed 1540 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
1540
315-
316void QQuickFlickablePrivate::itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &)-
317{-
318 Q_Q(QQuickFlickable);-
319 if (item == contentItem) {
item == contentItemDescription
TRUEevaluated 39814 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 155234 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
39814-155234
320 Qt::Orientations orient = nullptr;-
321 if (change.xChange())
change.xChange()Description
TRUEevaluated 10388 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 29426 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
10388-29426
322 orient |= Qt::Horizontal;
executed 10388 times by 7 tests: orient |= Qt::Horizontal;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
10388
323 if (change.yChange())
change.yChange()Description
TRUEevaluated 12988 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickvisualdatamodel
FALSEevaluated 26826 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
12988-26826
324 orient |= Qt::Vertical;
executed 12988 times by 7 tests: orient |= Qt::Vertical;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickvisualdatamodel
12988
325 if (orient)
orientDescription
TRUEevaluated 23376 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 16438 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
16438-23376
326 q->viewportMoved(orient);
executed 23376 times by 9 tests: q->viewportMoved(orient);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
23376
327 if (orient & Qt::Horizontal)
orient & Qt::HorizontalDescription
TRUEevaluated 10388 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 29426 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
10388-29426
328 emit q->contentXChanged();
executed 10388 times by 7 tests: q->contentXChanged();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
10388
329 if (orient & Qt::Vertical)
orient & Qt::VerticalDescription
TRUEevaluated 12988 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickvisualdatamodel
FALSEevaluated 26826 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
12988-26826
330 emit q->contentYChanged();
executed 12988 times by 7 tests: q->contentYChanged();
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickvisualdatamodel
12988
331 }
executed 39814 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
39814
332}
executed 195048 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
195048
333-
334bool QQuickFlickablePrivate::flickX(qreal velocity)-
335{-
336 Q_Q(QQuickFlickable);-
337 return flick(hData, q->minXExtent(), q->maxXExtent(), q->width(), fixupX_callback, velocity);
executed 1271 times by 6 tests: return flick(hData, q->minXExtent(), q->maxXExtent(), q->width(), fixupX_callback, velocity);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1271
338}-
339-
340bool QQuickFlickablePrivate::flickY(qreal velocity)-
341{-
342 Q_Q(QQuickFlickable);-
343 return flick(vData, q->minYExtent(), q->maxYExtent(), q->height(), fixupY_callback, velocity);
executed 1278 times by 5 tests: return flick(vData, q->minYExtent(), q->maxYExtent(), q->height(), fixupY_callback, velocity);
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1278
344}-
345-
346bool QQuickFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal,-
347 QQuickTimeLineCallback::Callback fixupCallback, qreal velocity)-
348{-
349 Q_Q(QQuickFlickable);-
350 qreal maxDistance = -1;-
351 data.fixingUp = false;-
352 // -ve velocity means list is moving up-
353 if (velocity > 0) {
velocity > 0Description
TRUEevaluated 164 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 169 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
164-169
354 maxDistance = qAbs(minExtent - data.move.value());-
355 data.flickTarget = minExtent;-
356 } else {
executed 164 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
164
357 maxDistance = qAbs(maxExtent - data.move.value());-
358 data.flickTarget = maxExtent;-
359 }
executed 169 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
169
360 if (maxDistance > 0 || boundsBehavior & QQuickFlickable::OvershootBounds) {
maxDistance > 0Description
TRUEevaluated 285 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 48 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
48-285
361 qreal v = velocity;-
362 if (maxVelocity != -1 && maxVelocity < qAbs(v)) {
maxVelocity != -1Description
TRUEevaluated 317 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
maxVelocity < qAbs(v)Description
TRUEnever evaluated
FALSEevaluated 317 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-317
363 if (v < 0)
v < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
364 v = -maxVelocity;
never executed: v = -maxVelocity;
0
365 else-
366 v = maxVelocity;
never executed: v = maxVelocity;
0
367 }-
368-
369 // adjust accel so that we hit a full pixel-
370 qreal accel = deceleration;-
371 qreal v2 = v * v;-
372 qreal dist = v2 / (accel * 2.0);-
373 if (v > 0)
v > 0Description
TRUEevaluated 156 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 161 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
156-161
374 dist = -dist;
executed 156 times by 7 tests: dist = -dist;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
156
375 qreal target = -Round(-(data.move.value() - dist));-
376 dist = -target + data.move.value();-
377 accel = v2 / (2.0f * qAbs(dist));-
378-
379 resetTimeline(data);-
380 if (!data.inOvershoot) {
!data.inOvershootDescription
TRUEevaluated 317 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
0-317
381 if (boundsBehavior & QQuickFlickable::OvershootBounds)
boundsBehavior...vershootBoundsDescription
TRUEevaluated 233 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquickflickable
84-233
382 timeline.accel(data.move, v, accel);
executed 233 times by 7 tests: timeline.accel(data.move, v, accel);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
233
383 else-
384 timeline.accel(data.move, v, accel, maxDistance);
executed 84 times by 1 test: timeline.accel(data.move, v, accel, maxDistance);
Executed by:
  • tst_qquickflickable
84
385 }-
386 timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this));-
387-
388 if (&data == &hData)
&data == &hDataDescription
TRUEevaluated 140 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 177 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
140-177
389 return !hData.flicking && q->xflick();
executed 140 times by 5 tests: return !hData.flicking && q->xflick();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
140
390 else if (&data == &vData)
&data == &vDataDescription
TRUEevaluated 177 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
0-177
391 return !vData.flicking && q->yflick();
executed 177 times by 5 tests: return !vData.flicking && q->yflick();
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
177
392 return false;
never executed: return false;
0
393 } else {-
394 resetTimeline(data);-
395 fixup(data, minExtent, maxExtent);-
396 return false;
executed 16 times by 1 test: return false;
Executed by:
  • tst_qquickflickable
16
397 }-
398}-
399-
400void QQuickFlickablePrivate::fixupY_callback(void *data)-
401{-
402 ((QQuickFlickablePrivate *)data)->fixupY();-
403}
executed 289 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
289
404-
405void QQuickFlickablePrivate::fixupX_callback(void *data)-
406{-
407 ((QQuickFlickablePrivate *)data)->fixupX();-
408}
executed 320 times by 5 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
320
409-
410void QQuickFlickablePrivate::fixupX()-
411{-
412 Q_Q(QQuickFlickable);-
413 if (!q->isComponentComplete())
!q->isComponentComplete()Description
TRUEevaluated 4010 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 5728 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4010-5728
414 return; //Do not fixup from initialization values
executed 4010 times by 14 tests: return;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4010
415 fixup(hData, q->minXExtent(), q->maxXExtent());-
416}
executed 5728 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
5728
417-
418void QQuickFlickablePrivate::fixupY()-
419{-
420 Q_Q(QQuickFlickable);-
421 if (!q->isComponentComplete())
!q->isComponentComplete()Description
TRUEevaluated 6382 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 17873 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
6382-17873
422 return; //Do not fixup from initialization values
executed 6382 times by 14 tests: return;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
6382
423 fixup(vData, q->minYExtent(), q->maxYExtent());-
424}
executed 17873 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
17873
425-
426void QQuickFlickablePrivate::adjustContentPos(AxisData &data, qreal toPos)-
427{-
428 Q_Q(QQuickFlickable);-
429 switch (fixupMode) {-
430 case Immediate:
executed 3528 times by 5 tests: case Immediate:
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
3528
431 timeline.set(data.move, toPos);-
432 break;
executed 3528 times by 5 tests: break;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
3528
433 case ExtentChanged:
executed 51 times by 1 test: case ExtentChanged:
Executed by:
  • tst_qquicklistview
51
434 // The target has changed. Don't start from the beginning; just complete the-
435 // second half of the animation using the new extent.-
436 timeline.move(data.move, toPos, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);-
437 data.fixingUp = true;-
438 break;
executed 51 times by 1 test: break;
Executed by:
  • tst_qquicklistview
51
439 default: {
executed 325 times by 7 tests: default:
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
325
440 if (data.transitionToBounds && data.transitionToBounds->startTransition(&data, toPos)) {
data.transitionToBoundsDescription
TRUEnever evaluated
FALSEevaluated 325 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
data.transitio...(&data, toPos)Description
TRUEnever evaluated
FALSEnever evaluated
0-325
441 q->movementStarting();-
442 data.fixingUp = true;-
443 } else {
never executed: end of block
0
444 qreal dist = toPos - data.move;-
445 timeline.move(data.move, toPos - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);-
446 timeline.move(data.move, toPos, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);-
447 data.fixingUp = true;-
448 }
executed 325 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
325
449 }-
450 }-
451}-
452-
453void QQuickFlickablePrivate::resetTimeline(AxisData &data)-
454{-
455 timeline.reset(data.move);-
456 if (data.transitionToBounds)
data.transitionToBoundsDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 44190 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4-44190
457 data.transitionToBounds->stopTransition();
executed 4 times by 1 test: data.transitionToBounds->stopTransition();
Executed by:
  • tst_qquickflickable
4
458}
executed 44194 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
44194
459-
460void QQuickFlickablePrivate::clearTimeline()-
461{-
462 timeline.clear();-
463 if (hData.transitionToBounds)
hData.transitionToBoundsDescription
TRUEnever evaluated
FALSEevaluated 2832 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-2832
464 hData.transitionToBounds->stopTransition();
never executed: hData.transitionToBounds->stopTransition();
0
465 if (vData.transitionToBounds)
vData.transitionToBoundsDescription
TRUEnever evaluated
FALSEevaluated 2832 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-2832
466 vData.transitionToBounds->stopTransition();
never executed: vData.transitionToBounds->stopTransition();
0
467}
executed 2832 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
2832
468-
469void QQuickFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)-
470{-
471 if (data.move.value() >= minExtent || maxExtent > minExtent) {
data.move.value() >= minExtentDescription
TRUEevaluated 15399 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 6488 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
maxExtent > minExtentDescription
TRUEnever evaluated
FALSEevaluated 6488 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
0-15399
472 resetTimeline(data);-
473 if (data.move.value() != minExtent) {
data.move.value() != minExtentDescription
TRUEevaluated 320 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 15079 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
320-15079
474 adjustContentPos(data, minExtent);-
475 }
executed 320 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
320
476 } else if (data.move.value() <= maxExtent) {
executed 15399 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
data.move.value() <= maxExtentDescription
TRUEevaluated 3584 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 2904 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
2904-15399
477 resetTimeline(data);-
478 adjustContentPos(data, maxExtent);-
479 } else if (-Round(-data.move.value()) != data.move.value()) {
executed 3584 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
-Round(-data.m...a.move.value()Description
TRUEevaluated 70 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 2834 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
70-3584
480 // We could animate, but since it is less than 0.5 pixel it's probably not worthwhile.-
481 resetTimeline(data);-
482 qreal val = data.move.value();-
483 if (std::abs(-Round(-val) - val) < 0.25) // round small differences
std::abs(-Roun... - val) < 0.25Description
TRUEevaluated 59 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
11-59
484 val = -Round(-val);
executed 59 times by 3 tests: val = -Round(-val);
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
59
485 else if (data.smoothVelocity.value() > 0) // continue direction of motion for larger
data.smoothVel...ty.value() > 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
5-6
486 val = -std::floor(-val);
executed 5 times by 1 test: val = -std::floor(-val);
Executed by:
  • tst_qquickgridview
5
487 else if (data.smoothVelocity.value() < 0)
data.smoothVel...ty.value() < 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
0-6
488 val = -std::ceil(-val);
never executed: val = -std::ceil(-val);
0
489 else // otherwise round-
490 val = -Round(-val);
executed 6 times by 2 tests: val = -Round(-val);
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
6
491 timeline.set(data.move, val);-
492 }
executed 70 times by 3 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
70
493 data.inOvershoot = false;-
494 fixupMode = Normal;-
495 data.vTime = timeline.time();-
496}
executed 21887 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
21887
497-
498static bool fuzzyLessThanOrEqualTo(qreal a, qreal b)-
499{-
500 if (a == 0.0 || b == 0.0) {
a == 0.0Description
TRUEevaluated 98422 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 143646 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
b == 0.0Description
TRUEevaluated 77341 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 66305 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
66305-143646
501 // qFuzzyCompare is broken-
502 a += 1.0;-
503 b += 1.0;-
504 }
executed 175763 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
175763
505 return a <= b || qFuzzyCompare(a, b);
executed 242068 times by 18 tests: return a <= b || qFuzzyCompare(a, b);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
242068
506}-
507-
508void QQuickFlickablePrivate::updateBeginningEnd()-
509{-
510 Q_Q(QQuickFlickable);-
511 bool atBoundaryChange = false;-
512-
513 // Vertical-
514 const qreal maxyextent = -q->maxYExtent();-
515 const qreal minyextent = -q->minYExtent();-
516 const qreal ypos = -vData.move.value();-
517 bool atBeginning = fuzzyLessThanOrEqualTo(ypos, minyextent);-
518 bool atEnd = fuzzyLessThanOrEqualTo(maxyextent, ypos);-
519-
520 if (atBeginning != vData.atBeginning) {
atBeginning !=...ta.atBeginningDescription
TRUEevaluated 2230 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 57676 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
2230-57676
521 vData.atBeginning = atBeginning;-
522 atBoundaryChange = true;-
523 }
executed 2230 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
2230
524 if (atEnd != vData.atEnd) {
atEnd != vData.atEndDescription
TRUEevaluated 8187 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 51719 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
8187-51719
525 vData.atEnd = atEnd;-
526 atBoundaryChange = true;-
527 }
executed 8187 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
8187
528-
529 // Horizontal-
530 const qreal maxxextent = -q->maxXExtent();-
531 const qreal minxextent = -q->minXExtent();-
532 const qreal xpos = -hData.move.value();-
533 atBeginning = fuzzyLessThanOrEqualTo(xpos, minxextent);-
534 atEnd = fuzzyLessThanOrEqualTo(maxxextent, xpos);-
535-
536 if (atBeginning != hData.atBeginning) {
atBeginning !=...ta.atBeginningDescription
TRUEevaluated 1294 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 58612 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
1294-58612
537 hData.atBeginning = atBeginning;-
538 atBoundaryChange = true;-
539 }
executed 1294 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1294
540 if (atEnd != hData.atEnd) {
atEnd != hData.atEndDescription
TRUEevaluated 5502 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 54404 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
5502-54404
541 hData.atEnd = atEnd;-
542 atBoundaryChange = true;-
543 }
executed 5502 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
5502
544-
545 if (vData.extentsChanged) {
vData.extentsChangedDescription
TRUEevaluated 27283 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 32623 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
27283-32623
546 vData.extentsChanged = false;-
547 qreal originY = q->originY();-
548 if (vData.origin != originY) {
vData.origin != originYDescription
TRUEevaluated 1533 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 25750 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
1533-25750
549 vData.origin = originY;-
550 emit q->originYChanged();-
551 }
executed 1533 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
1533
552 }
executed 27283 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_touchmouse
27283
553-
554 if (hData.extentsChanged) {
hData.extentsChangedDescription
TRUEevaluated 6267 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_touchmouse
FALSEevaluated 53639 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
6267-53639
555 hData.extentsChanged = false;-
556 qreal originX = q->originX();-
557 if (hData.origin != originX) {
hData.origin != originXDescription
TRUEevaluated 1076 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 5191 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_touchmouse
1076-5191
558 hData.origin = originX;-
559 emit q->originXChanged();-
560 }
executed 1076 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
1076
561 }
executed 6267 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_touchmouse
6267
562-
563 if (atBoundaryChange)
atBoundaryChangeDescription
TRUEevaluated 12573 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
FALSEevaluated 47333 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
12573-47333
564 emit q->isAtBoundaryChanged();
executed 12573 times by 18 tests: q->isAtBoundaryChanged();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
12573
565-
566 if (visibleArea)
visibleAreaDescription
TRUEevaluated 4235 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 55671 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
4235-55671
567 visibleArea->updateVisible();
executed 4235 times by 3 tests: visibleArea->updateVisible();
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
4235
568}
executed 59906 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_touchmouse
59906
569-
570/*!-
571 \qmlsignal QtQuick::Flickable::dragStarted()-
572-
573 This signal is emitted when the view starts to be dragged due to user-
574 interaction.-
575-
576 The corresponding handler is \c onDragStarted.-
577*/-
578-
579/*!-
580 \qmlsignal QtQuick::Flickable::dragEnded()-
581-
582 This signal is emitted when the user stops dragging the view.-
583-
584 If the velocity of the drag is sufficient at the time the-
585 touch/mouse button is released then a flick will start.-
586-
587 The corresponding handler is \c onDragEnded.-
588*/-
589-
590/*!-
591 \qmltype Flickable-
592 \instantiates QQuickFlickable-
593 \inqmlmodule QtQuick-
594 \ingroup qtquick-input-
595 \ingroup qtquick-containers-
596-
597 \brief Provides a surface that can be "flicked".-
598 \inherits Item-
599-
600 The Flickable item places its children on a surface that can be dragged-
601 and flicked, causing the view onto the child items to scroll. This-
602 behavior forms the basis of Items that are designed to show large numbers-
603 of child items, such as \l ListView and \l GridView.-
604-
605 In traditional user interfaces, views can be scrolled using standard-
606 controls, such as scroll bars and arrow buttons. In some situations, it-
607 is also possible to drag the view directly by pressing and holding a-
608 mouse button while moving the cursor. In touch-based user interfaces,-
609 this dragging action is often complemented with a flicking action, where-
610 scrolling continues after the user has stopped touching the view.-
611-
612 Flickable does not automatically clip its contents. If it is not used as-
613 a full-screen item, you should consider setting the \l{Item::}{clip} property-
614 to true.-
615-
616 \section1 Example Usage-
617-
618 \div {class="float-right"}-
619 \inlineimage flickable.gif-
620 \enddiv-
621-
622 The following example shows a small view onto a large image in which the-
623 user can drag or flick the image in order to view different parts of it.-
624-
625 \snippet qml/flickable.qml document-
626-
627 \clearfloat-
628-
629 Items declared as children of a Flickable are automatically parented to the-
630 Flickable's \l contentItem. This should be taken into account when-
631 operating on the children of the Flickable; it is usually the children of-
632 \c contentItem that are relevant. For example, the bound of Items added-
633 to the Flickable will be available by \c contentItem.childrenRect-
634-
635 \section1 Limitations-
636-
637 \note Due to an implementation detail, items placed inside a Flickable-
638 cannot anchor to the Flickable. Instead, use \l {Item::}{parent}, which-
639 refers to the Flickable's \l contentItem. The size of the content item is-
640 determined by \l contentWidth and \l contentHeight.-
641*/-
642-
643/*!-
644 \qmlsignal QtQuick::Flickable::movementStarted()-
645-
646 This signal is emitted when the view begins moving due to user-
647 interaction or a generated flick().-
648-
649 The corresponding handler is \c onMovementStarted.-
650*/-
651-
652/*!-
653 \qmlsignal QtQuick::Flickable::movementEnded()-
654-
655 This signal is emitted when the view stops moving due to user-
656 interaction or a generated flick(). If a flick was active, this signal will-
657 be emitted once the flick stops. If a flick was not-
658 active, this signal will be emitted when the-
659 user stops dragging - i.e. a mouse or touch release.-
660-
661 The corresponding handler is \c onMovementEnded.-
662*/-
663-
664/*!-
665 \qmlsignal QtQuick::Flickable::flickStarted()-
666-
667 This signal is emitted when the view is flicked. A flick-
668 starts from the point that the mouse or touch is released,-
669 while still in motion.-
670-
671 The corresponding handler is \c onFlickStarted.-
672*/-
673-
674/*!-
675 \qmlsignal QtQuick::Flickable::flickEnded()-
676-
677 This signal is emitted when the view stops moving due to a flick.-
678-
679 The corresponding handler is \c onFlickEnded.-
680*/-
681-
682/*!-
683 \qmlpropertygroup QtQuick::Flickable::visibleArea-
684 \qmlproperty real QtQuick::Flickable::visibleArea.xPosition-
685 \qmlproperty real QtQuick::Flickable::visibleArea.widthRatio-
686 \qmlproperty real QtQuick::Flickable::visibleArea.yPosition-
687 \qmlproperty real QtQuick::Flickable::visibleArea.heightRatio-
688-
689 These properties describe the position and size of the currently viewed area.-
690 The size is defined as the percentage of the full view currently visible,-
691 scaled to 0.0 - 1.0. The page position is usually in the range 0.0 (beginning) to-
692 1.0 minus size ratio (end), i.e. \c yPosition is in the range 0.0 to 1.0-\c heightRatio.-
693 However, it is possible for the contents to be dragged outside of the normal-
694 range, resulting in the page positions also being outside the normal range.-
695-
696 These properties are typically used to draw a scrollbar. For example:-
697-
698 \snippet qml/flickableScrollbar.qml 0-
699 \dots 8-
700 \snippet qml/flickableScrollbar.qml 1-
701-
702 \sa {customitems/scrollbar}{UI Components: Scrollbar Example}-
703*/-
704QQuickFlickable::QQuickFlickable(QQuickItem *parent)-
705 : QQuickItem(*(new QQuickFlickablePrivate), parent)-
706{-
707 Q_D(QQuickFlickable);-
708 d->init();-
709}
executed 296 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_touchmouse
296
710-
711QQuickFlickable::QQuickFlickable(QQuickFlickablePrivate &dd, QQuickItem *parent)-
712 : QQuickItem(dd, parent)-
713{-
714 Q_D(QQuickFlickable);-
715 d->init();-
716}
executed 3804 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
3804
717-
718QQuickFlickable::~QQuickFlickable()-
719{-
720}-
721-
722/*!-
723 \qmlproperty real QtQuick::Flickable::contentX-
724 \qmlproperty real QtQuick::Flickable::contentY-
725-
726 These properties hold the surface coordinate currently at the top-left-
727 corner of the Flickable. For example, if you flick an image up 100 pixels,-
728 \c contentY will increase by 100.-
729-
730 \note If you flick back to the origin (the top-left corner), after the-
731 rebound animation, \c contentX will settle to the same value as \c originX,-
732 and \c contentY to \c originY. These are usually (0,0), however ListView-
733 and GridView may have an arbitrary origin due to delegate size variation,-
734 or item insertion/removal outside the visible region. So if you want to-
735 implement something like a vertical scrollbar, one way is to use-
736 \c {y: (contentY - originY) * (height / contentHeight)}-
737 for the position; another way is to use the normalized values in-
738 \l {QtQuick::Flickable::visibleArea}{visibleArea}.-
739-
740 \sa originX, originY-
741*/-
742qreal QQuickFlickable::contentX() const-
743{-
744 Q_D(const QQuickFlickable);-
745 return -d->contentItem->x();
executed 65931 times by 10 tests: return -d->contentItem->x();
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
65931
746}-
747-
748void QQuickFlickable::setContentX(qreal pos)-
749{-
750 Q_D(QQuickFlickable);-
751 d->hData.explicitValue = true;-
752 d->resetTimeline(d->hData);-
753 d->hData.vTime = d->timeline.time();-
754 if (isMoving() || isFlicking())
isMoving()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 8592 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
isFlicking()Description
TRUEnever evaluated
FALSEevaluated 8592 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
0-8592
755 movementEnding(true, false);
executed 24 times by 2 tests: movementEnding(true, false);
Executed by:
  • tst_qquickflickable
  • tst_qquickmousearea
24
756 if (-pos != d->hData.move.value())
-pos != d->hData.move.value()Description
TRUEevaluated 1647 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 6969 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
1647-6969
757 d->hData.move.setValue(-pos);
executed 1647 times by 6 tests: d->hData.move.setValue(-pos);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1647
758}
executed 8616 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
8616
759-
760qreal QQuickFlickable::contentY() const-
761{-
762 Q_D(const QQuickFlickable);-
763 return -d->contentItem->y();
executed 136739 times by 15 tests: return -d->contentItem->y();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
136739
764}-
765-
766void QQuickFlickable::setContentY(qreal pos)-
767{-
768 Q_D(QQuickFlickable);-
769 d->vData.explicitValue = true;-
770 d->resetTimeline(d->vData);-
771 d->vData.vTime = d->timeline.time();-
772 if (isMoving() || isFlicking())
isMoving()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 13909 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
isFlicking()Description
TRUEnever evaluated
FALSEevaluated 13909 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
0-13909
773 movementEnding(false, true);
executed 24 times by 2 tests: movementEnding(false, true);
Executed by:
  • tst_qquickflickable
  • tst_qquickmousearea
24
774 if (-pos != d->vData.move.value())
-pos != d->vData.move.value()Description
TRUEevaluated 3501 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
FALSEevaluated 10432 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3501-10432
775 d->vData.move.setValue(-pos);
executed 3501 times by 6 tests: d->vData.move.setValue(-pos);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickvisualdatamodel
3501
776}
executed 13933 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
13933
777-
778/*!-
779 \qmlproperty bool QtQuick::Flickable::interactive-
780-
781 This property describes whether the user can interact with the Flickable.-
782 A user cannot drag or flick a Flickable that is not interactive.-
783-
784 By default, this property is true.-
785-
786 This property is useful for temporarily disabling flicking. This allows-
787 special interaction with Flickable's children; for example, you might want-
788 to freeze a flickable map while scrolling through a pop-up dialog that-
789 is a child of the Flickable.-
790*/-
791bool QQuickFlickable::isInteractive() const-
792{-
793 Q_D(const QQuickFlickable);-
794 return d->interactive;
executed 2189 times by 7 tests: return d->interactive;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
2189
795}-
796-
797void QQuickFlickable::setInteractive(bool interactive)-
798{-
799 Q_D(QQuickFlickable);-
800 if (interactive != d->interactive) {
interactive != d->interactiveDescription
TRUEevaluated 24 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
4-24
801 d->interactive = interactive;-
802 if (!interactive) {
!interactiveDescription
TRUEevaluated 16 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
8-16
803 d->cancelInteraction();-
804 }
executed 16 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
16
805 emit interactiveChanged();-
806 }
executed 24 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
24
807}
executed 28 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
28
808-
809/*!-
810 \qmlproperty real QtQuick::Flickable::horizontalVelocity-
811 \qmlproperty real QtQuick::Flickable::verticalVelocity-
812-
813 The instantaneous velocity of movement along the x and y axes, in pixels/sec.-
814-
815 The reported velocity is smoothed to avoid erratic output.-
816-
817 Note that for views with a large content size (more than 10 times the view size),-
818 the velocity of the flick may exceed the velocity of the touch in the case-
819 of multiple quick consecutive flicks. This allows the user to flick faster-
820 through large content.-
821*/-
822qreal QQuickFlickable::horizontalVelocity() const-
823{-
824 Q_D(const QQuickFlickable);-
825 return d->hData.smoothVelocity.value();
executed 15 times by 3 tests: return d->hData.smoothVelocity.value();
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
15
826}-
827-
828qreal QQuickFlickable::verticalVelocity() const-
829{-
830 Q_D(const QQuickFlickable);-
831 return d->vData.smoothVelocity.value();
executed 62 times by 3 tests: return d->vData.smoothVelocity.value();
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
62
832}-
833-
834/*!-
835 \qmlproperty bool QtQuick::Flickable::atXBeginning-
836 \qmlproperty bool QtQuick::Flickable::atXEnd-
837 \qmlproperty bool QtQuick::Flickable::atYBeginning-
838 \qmlproperty bool QtQuick::Flickable::atYEnd-
839-
840 These properties are true if the flickable view is positioned at the beginning,-
841 or end respectively.-
842*/-
843bool QQuickFlickable::isAtXEnd() const-
844{-
845 Q_D(const QQuickFlickable);-
846 return d->hData.atEnd;
executed 168 times by 3 tests: return d->hData.atEnd;
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
168
847}-
848-
849bool QQuickFlickable::isAtXBeginning() const-
850{-
851 Q_D(const QQuickFlickable);-
852 return d->hData.atBeginning;
executed 158 times by 3 tests: return d->hData.atBeginning;
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
158
853}-
854-
855bool QQuickFlickable::isAtYEnd() const-
856{-
857 Q_D(const QQuickFlickable);-
858 return d->vData.atEnd;
executed 193 times by 5 tests: return d->vData.atEnd;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
193
859}-
860-
861bool QQuickFlickable::isAtYBeginning() const-
862{-
863 Q_D(const QQuickFlickable);-
864 return d->vData.atBeginning;
executed 190 times by 5 tests: return d->vData.atBeginning;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
190
865}-
866-
867/*!-
868 \qmlproperty Item QtQuick::Flickable::contentItem-
869-
870 The internal item that contains the Items to be moved in the Flickable.-
871-
872 Items declared as children of a Flickable are automatically parented to the Flickable's contentItem.-
873-
874 Items created dynamically need to be explicitly parented to the \e contentItem:-
875 \code-
876 Flickable {-
877 id: myFlickable-
878 function addItem(file) {-
879 var component = Qt.createComponent(file)-
880 component.createObject(myFlickable.contentItem);-
881 }-
882 }-
883 \endcode-
884*/-
885QQuickItem *QQuickFlickable::contentItem() const-
886{-
887 Q_D(const QQuickFlickable);-
888 return d->contentItem;
executed 172139 times by 12 tests: return d->contentItem;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
172139
889}-
890-
891QQuickFlickableVisibleArea *QQuickFlickable::visibleArea()-
892{-
893 Q_D(QQuickFlickable);-
894 if (!d->visibleArea) {
!d->visibleAreaDescription
TRUEevaluated 566 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 1802 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
566-1802
895 d->visibleArea = new QQuickFlickableVisibleArea(this);-
896 d->visibleArea->updateVisible(); // calculate initial ratios-
897 }
executed 566 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
566
898 return d->visibleArea;
executed 2368 times by 3 tests: return d->visibleArea;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
2368
899}-
900-
901/*!-
902 \qmlproperty enumeration QtQuick::Flickable::flickableDirection-
903-
904 This property determines which directions the view can be flicked.-
905-
906 \list-
907 \li Flickable.AutoFlickDirection (default) - allows flicking vertically if the-
908 \e contentHeight is not equal to the \e height of the Flickable.-
909 Allows flicking horizontally if the \e contentWidth is not equal-
910 to the \e width of the Flickable.-
911 \li Flickable.AutoFlickIfNeeded - allows flicking vertically if the-
912 \e contentHeight is greater than the \e height of the Flickable.-
913 Allows flicking horizontally if the \e contentWidth is greater than-
914 to the \e width of the Flickable. (since \c{QtQuick 2.7})-
915 \li Flickable.HorizontalFlick - allows flicking horizontally.-
916 \li Flickable.VerticalFlick - allows flicking vertically.-
917 \li Flickable.HorizontalAndVerticalFlick - allows flicking in both directions.-
918 \endlist-
919*/-
920QQuickFlickable::FlickableDirection QQuickFlickable::flickableDirection() const-
921{-
922 Q_D(const QQuickFlickable);-
923 return d->flickableDirection;
executed 66 times by 1 test: return d->flickableDirection;
Executed by:
  • tst_qquickflickable
66
924}-
925-
926void QQuickFlickable::setFlickableDirection(FlickableDirection direction)-
927{-
928 Q_D(QQuickFlickable);-
929 if (direction != d->flickableDirection) {
direction != d...kableDirectionDescription
TRUEevaluated 4658 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 56 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
56-4658
930 d->flickableDirection = direction;-
931 emit flickableDirectionChanged();-
932 }
executed 4658 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4658
933}
executed 4714 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4714
934-
935/*!-
936 \qmlproperty bool QtQuick::Flickable::pixelAligned-
937-
938 This property sets the alignment of \l contentX and \l contentY to-
939 pixels (\c true) or subpixels (\c false).-
940-
941 Enable pixelAligned to optimize for still content or moving content with-
942 high constrast edges, such as one-pixel-wide lines, text or vector graphics.-
943 Disable pixelAligned when optimizing for animation quality.-
944-
945 The default is \c false.-
946*/-
947bool QQuickFlickable::pixelAligned() const-
948{-
949 Q_D(const QQuickFlickable);-
950 return d->pixelAligned;
never executed: return d->pixelAligned;
0
951}-
952-
953void QQuickFlickable::setPixelAligned(bool align)-
954{-
955 Q_D(QQuickFlickable);-
956 if (align != d->pixelAligned) {
align != d->pixelAlignedDescription
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
10-42
957 d->pixelAligned = align;-
958 emit pixelAlignedChanged();-
959 }
executed 42 times by 2 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
42
960}
executed 52 times by 2 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
52
961-
962qint64 QQuickFlickablePrivate::computeCurrentTime(QInputEvent *event) const-
963{-
964 if (0 != event->timestamp())
0 != event->timestamp()Description
TRUEevaluated 6406 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
0-6406
965 return event->timestamp();
executed 6406 times by 7 tests: return event->timestamp();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
6406
966 if (!timer.isValid())
!timer.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
0
967 return 0LL;
never executed: return 0LL;
0
968 return timer.elapsed();
never executed: return timer.elapsed();
0
969}-
970-
971qreal QQuickFlickablePrivate::devicePixelRatio() const-
972{-
973 return (window ? window->effectiveDevicePixelRatio() : qApp->devicePixelRatio());
never executed: return (window ? window->effectiveDevicePixelRatio() : (static_cast<QGuiApplication *>(QCoreApplication::instance()))->devicePixelRatio());
0
974}-
975-
976void QQuickFlickablePrivate::handleMousePressEvent(QMouseEvent *event)-
977{-
978 Q_Q(QQuickFlickable);-
979 timer.start();-
980 if (interactive && timeline.isActive()
interactiveDescription
TRUEevaluated 1012 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
timeline.isActive()Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 979 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-1012
981 && ((qAbs(hData.smoothVelocity.value()) > RetainGrabVelocity && !hData.fixingUp && !hData.inOvershoot)
qAbs(hData.smo...inGrabVelocityDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
!hData.fixingUpDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEnever evaluated
!hData.inOvershootDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEnever evaluated
0-25
982 || (qAbs(vData.smoothVelocity.value()) > RetainGrabVelocity && !vData.fixingUp && !vData.inOvershoot))) {
qAbs(vData.smo...inGrabVelocityDescription
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
!vData.fixingUpDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
!vData.inOvershootDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
0-23
983 stealMouse = true; // If we've been flicked then steal the click.-
984 int flickTime = timeline.time();-
985 if (flickTime > 600) {
flickTime > 600Description
TRUEnever evaluated
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
0-20
986 // too long between flicks - cancel boost-
987 hData.continuousFlickVelocity = 0;-
988 vData.continuousFlickVelocity = 0;-
989 flickBoost = 1.0;-
990 } else {
never executed: end of block
0
991 hData.continuousFlickVelocity = -hData.smoothVelocity.value();-
992 vData.continuousFlickVelocity = -vData.smoothVelocity.value();-
993 if (flickTime > 300) // slower flicking - reduce boost
flickTime > 300Description
TRUEnever evaluated
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
0-20
994 flickBoost = qMax(1.0, flickBoost - 0.5);
never executed: flickBoost = qMax(1.0, flickBoost - 0.5);
0
995 }
executed 20 times by 2 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
20
996 } else {-
997 stealMouse = false;-
998 hData.continuousFlickVelocity = 0;-
999 vData.continuousFlickVelocity = 0;-
1000 flickBoost = 1.0;-
1001 }
executed 992 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
992
1002 q->setKeepMouseGrab(stealMouse);-
1003-
1004 maybeBeginDrag(computeCurrentTime(event), event->localPos());-
1005}
executed 1012 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
1012
1006-
1007void QQuickFlickablePrivate::maybeBeginDrag(qint64 currentTimestamp, const QPointF &pressPosn)-
1008{-
1009 Q_Q(QQuickFlickable);-
1010 clearDelayedPress();-
1011 pressed = true;-
1012-
1013 if (hData.transitionToBounds)
hData.transitionToBoundsDescription
TRUEnever evaluated
FALSEevaluated 1012 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-1012
1014 hData.transitionToBounds->stopTransition();
never executed: hData.transitionToBounds->stopTransition();
0
1015 if (vData.transitionToBounds)
vData.transitionToBoundsDescription
TRUEnever evaluated
FALSEevaluated 1012 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-1012
1016 vData.transitionToBounds->stopTransition();
never executed: vData.transitionToBounds->stopTransition();
0
1017 if (!hData.fixingUp)
!hData.fixingUpDescription
TRUEevaluated 1006 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickflickable
6-1006
1018 resetTimeline(hData);
executed 1006 times by 7 tests: resetTimeline(hData);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
1006
1019 if (!vData.fixingUp)
!vData.fixingUpDescription
TRUEevaluated 993 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 19 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
19-993
1020 resetTimeline(vData);
executed 993 times by 7 tests: resetTimeline(vData);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
993
1021-
1022 hData.reset();-
1023 vData.reset();-
1024 hData.dragMinBound = q->minXExtent() - hData.startMargin;-
1025 vData.dragMinBound = q->minYExtent() - vData.startMargin;-
1026 hData.dragMaxBound = q->maxXExtent() + hData.endMargin;-
1027 vData.dragMaxBound = q->maxYExtent() + vData.endMargin;-
1028 fixupMode = Normal;-
1029 lastPos = QPointF();-
1030 pressPos = pressPosn;-
1031 hData.pressPos = hData.move.value();-
1032 vData.pressPos = vData.move.value();-
1033 bool wasFlicking = hData.flicking || vData.flicking;
hData.flickingDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEevaluated 1004 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
vData.flickingDescription
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 981 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
8-1004
1034 if (hData.flicking) {
hData.flickingDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEevaluated 1004 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
8-1004
1035 hData.flicking = false;-
1036 emit q->flickingHorizontallyChanged();-
1037 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickgridview
8
1038 if (vData.flicking) {
vData.flickingDescription
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 989 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
23-989
1039 vData.flicking = false;-
1040 emit q->flickingVerticallyChanged();-
1041 }
executed 23 times by 2 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
23
1042 if (wasFlicking)
wasFlickingDescription
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 981 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
31-981
1043 emit q->flickingChanged();
executed 31 times by 2 tests: q->flickingChanged();
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
31
1044 lastPosTime = lastPressTime = currentTimestamp;-
1045 vData.velocityTime.start();-
1046 hData.velocityTime.start();-
1047}
executed 1012 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
1012
1048-
1049void QQuickFlickablePrivate::drag(qint64 currentTimestamp, QEvent::Type eventType, const QPointF &localPos,-
1050 const QVector2D &deltas, bool overThreshold, bool momentum,-
1051 bool velocitySensitiveOverBounds, const QVector2D &velocity)-
1052{-
1053 Q_Q(QQuickFlickable);-
1054 bool rejectY = false;-
1055 bool rejectX = false;-
1056-
1057 bool keepY = q->yflick();-
1058 bool keepX = q->xflick();-
1059-
1060 bool stealY = false;-
1061 bool stealX = false;-
1062 if (eventType == QEvent::MouseMove) {
eventType == QEvent::MouseMoveDescription
TRUEevaluated 4540 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
0-4540
1063 stealX = stealY = stealMouse;-
1064 } else if (eventType == QEvent::Wheel) {
executed 4540 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
eventType == QEvent::WheelDescription
TRUEnever evaluated
FALSEnever evaluated
0-4540
1065 stealX = stealY = scrollingPhase;-
1066 }
never executed: end of block
0
1067-
1068 bool prevHMoved = hMoved;-
1069 bool prevVMoved = vMoved;-
1070-
1071 qint64 elapsedSincePress = currentTimestamp - lastPressTime;-
1072-
1073 if (q->yflick()) {
q->yflick()Description
TRUEevaluated 3024 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1516 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
1516-3024
1074 qreal dy = deltas.y();-
1075 if (overThreshold || elapsedSincePress > 200) {
overThresholdDescription
TRUEevaluated 2662 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 362 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
elapsedSincePress > 200Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 354 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
8-2662
1076 if (!vMoved)
!vMovedDescription
TRUEevaluated 1174 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1496 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1174-1496
1077 vData.dragStartOffset = dy;
executed 1174 times by 6 tests: vData.dragStartOffset = dy;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1174
1078 qreal newY = dy + vData.pressPos - vData.dragStartOffset;-
1079 // Recalculate bounds in case margins have changed, but use the content-
1080 // size estimate taken at the start of the drag in case the drag causes-
1081 // the estimate to be altered-
1082 const qreal minY = vData.dragMinBound + vData.startMargin;-
1083 const qreal maxY = vData.dragMaxBound - vData.endMargin;-
1084 if (!(boundsBehavior & QQuickFlickable::DragOverBounds)) {
!(boundsBehavi...ragOverBounds)Description
TRUEevaluated 600 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 2070 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
600-2070
1085 if (fuzzyLessThanOrEqualTo(newY, maxY)) {
fuzzyLessThanO...To(newY, maxY)Description
TRUEevaluated 110 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 490 times by 1 test
Evaluated by:
  • tst_qquickflickable
110-490
1086 newY = maxY;-
1087 rejectY = vData.pressPos == maxY && vData.move.value() == maxY && dy < 0;
vData.pressPos == maxYDescription
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
vData.move.value() == maxYDescription
TRUEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
dy < 0Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickflickable
4-102
1088 }
executed 110 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
110
1089 if (fuzzyLessThanOrEqualTo(minY, newY)) {
fuzzyLessThanO...To(minY, newY)Description
TRUEevaluated 110 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 490 times by 1 test
Evaluated by:
  • tst_qquickflickable
110-490
1090 newY = minY;-
1091 rejectY |= vData.pressPos == minY && vData.move.value() == minY && dy > 0;
vData.pressPos == minYDescription
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
vData.move.value() == minYDescription
TRUEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
dy > 0Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickflickable
4-102
1092 }
executed 110 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
110
1093 } else {
executed 600 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
600
1094 qreal vel = velocity.y() / QML_FLICK_OVERSHOOTFRICTION;-
1095 if (vel > 0. && vel > vData.velocity)
vel > 0.Description
TRUEevaluated 892 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1178 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
vel > vData.velocityDescription
TRUEevaluated 108 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 784 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
108-1178
1096 vData.velocity = qMin(velocity.y() / QML_FLICK_OVERSHOOTFRICTION, float(QML_FLICK_DEFAULTMAXVELOCITY));
executed 108 times by 6 tests: vData.velocity = qMin(velocity.y() / 8, float(2500));
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
108
1097 else if (vel < 0. && vel < vData.velocity)
vel < 0.Description
TRUEevaluated 820 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1142 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
vel < vData.velocityDescription
TRUEevaluated 125 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 695 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
125-1142
1098 vData.velocity = qMax(velocity.y() / QML_FLICK_OVERSHOOTFRICTION, -float(QML_FLICK_DEFAULTMAXVELOCITY));
executed 125 times by 5 tests: vData.velocity = qMax(velocity.y() / 8, -float(2500));
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
125
1099 if (newY > minY) {
newY > minYDescription
TRUEevaluated 274 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1796 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
274-1796
1100 // Overshoot beyond the top. But don't wait for momentum phase to end before returning to bounds.-
1101 if (momentum && vData.atBeginning) {
momentumDescription
TRUEnever evaluated
FALSEevaluated 274 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
vData.atBeginningDescription
TRUEnever evaluated
FALSEnever evaluated
0-274
1102 if (!vData.inRebound) {
!vData.inReboundDescription
TRUEnever evaluated
FALSEnever evaluated
0
1103 vData.inRebound = true;-
1104 q->returnToBounds();-
1105 }
never executed: end of block
0
1106 return;
never executed: return;
0
1107 }-
1108 if (velocitySensitiveOverBounds) {
velocitySensitiveOverBoundsDescription
TRUEnever evaluated
FALSEevaluated 274 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
0-274
1109 qreal overshoot = (newY - minY) * vData.velocity / QML_FLICK_DEFAULTMAXVELOCITY / QML_FLICK_OVERSHOOTFRICTION;-
1110 overshoot = QML_FLICK_OVERSHOOT * devicePixelRatio() * EaseOvershoot(overshoot / QML_FLICK_OVERSHOOT / devicePixelRatio());-
1111 newY = minY + overshoot;-
1112 } else {
never executed: end of block
0
1113 newY = minY + (newY - minY) / 2;-
1114 }
executed 274 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
274
1115 } else if (newY < maxY && maxY - minY <= 0) {
newY < maxYDescription
TRUEevaluated 89 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 1707 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
maxY - minY <= 0Description
TRUEevaluated 89 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEnever evaluated
0-1707
1116 // Overshoot beyond the bottom. But don't wait for momentum phase to end before returning to bounds.-
1117 if (momentum && vData.atEnd) {
momentumDescription
TRUEnever evaluated
FALSEevaluated 89 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vData.atEndDescription
TRUEnever evaluated
FALSEnever evaluated
0-89
1118 if (!vData.inRebound) {
!vData.inReboundDescription
TRUEnever evaluated
FALSEnever evaluated
0
1119 vData.inRebound = true;-
1120 q->returnToBounds();-
1121 }
never executed: end of block
0
1122 return;
never executed: return;
0
1123 }-
1124 if (velocitySensitiveOverBounds) {
velocitySensitiveOverBoundsDescription
TRUEnever evaluated
FALSEevaluated 89 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
0-89
1125 qreal overshoot = (newY - maxY) * vData.velocity / QML_FLICK_DEFAULTMAXVELOCITY / QML_FLICK_OVERSHOOTFRICTION;-
1126 overshoot = QML_FLICK_OVERSHOOT * devicePixelRatio() * EaseOvershoot(overshoot / QML_FLICK_OVERSHOOT / devicePixelRatio());-
1127 newY = maxY - overshoot;-
1128 } else {
never executed: end of block
0
1129 newY = maxY + (newY - maxY) / 2;-
1130 }
executed 89 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
89
1131 }-
1132 }
executed 2070 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
2070
1133 if (!rejectY && stealMouse && dy != 0.0 && dy != vData.previousDragDelta) {
!rejectYDescription
TRUEevaluated 2530 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquickflickable
stealMouseDescription
TRUEevaluated 2076 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 454 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
dy != 0.0Description
TRUEevaluated 1846 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 230 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
dy != vData.previousDragDeltaDescription
TRUEevaluated 1554 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 292 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
140-2530
1134 clearTimeline();-
1135 vData.move.setValue(newY);-
1136 vMoved = true;-
1137 }
executed 1554 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1554
1138 if (!rejectY && overThreshold)
!rejectYDescription
TRUEevaluated 2530 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquickflickable
overThresholdDescription
TRUEevaluated 2522 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
8-2530
1139 stealY = true;
executed 2522 times by 6 tests: stealY = true;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
2522
1140-
1141 if ((newY >= minY && vData.pressPos == minY && vData.move.value() == minY && dy > 0)
newY >= minYDescription
TRUEevaluated 678 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1992 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vData.pressPos == minYDescription
TRUEevaluated 612 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 66 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vData.move.value() == minYDescription
TRUEevaluated 396 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 216 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
dy > 0Description
TRUEevaluated 158 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
FALSEevaluated 238 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
66-1992
1142 || (newY <= maxY && vData.pressPos == maxY && vData.move.value() == maxY && dy < 0)) {
newY <= maxYDescription
TRUEevaluated 325 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 2187 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
vData.pressPos == maxYDescription
TRUEevaluated 268 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 57 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vData.move.value() == maxYDescription
TRUEevaluated 228 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 40 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
dy < 0Description
TRUEevaluated 140 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 88 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
40-2187
1143 keepY = false;-
1144 }
executed 298 times by 5 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
298
1145 }
executed 2670 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
2670
1146 vData.previousDragDelta = dy;-
1147 }
executed 3024 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
3024
1148-
1149 if (q->xflick()) {
q->xflick()Description
TRUEevaluated 2640 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1900 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1900-2640
1150 qreal dx = deltas.x();-
1151 if (overThreshold || elapsedSincePress > 200) {
overThresholdDescription
TRUEevaluated 2292 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 348 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickpathview
elapsedSincePress > 200Description
TRUEnever evaluated
FALSEevaluated 348 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickpathview
0-2292
1152 if (!hMoved)
!hMovedDescription
TRUEevaluated 1116 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1176 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
1116-1176
1153 hData.dragStartOffset = dx;
executed 1116 times by 6 tests: hData.dragStartOffset = dx;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1116
1154 qreal newX = dx + hData.pressPos - hData.dragStartOffset;-
1155 const qreal minX = hData.dragMinBound + hData.startMargin;-
1156 const qreal maxX = hData.dragMaxBound - hData.endMargin;-
1157 if (!(boundsBehavior & QQuickFlickable::DragOverBounds)) {
!(boundsBehavi...ragOverBounds)Description
TRUEevaluated 622 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 1670 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
622-1670
1158 if (fuzzyLessThanOrEqualTo(newX, maxX)) {
fuzzyLessThanO...To(newX, maxX)Description
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 490 times by 1 test
Evaluated by:
  • tst_qquickflickable
132-490
1159 newX = maxX;-
1160 rejectX = hData.pressPos == maxX && hData.move.value() == maxX && dx < 0;
hData.pressPos == maxXDescription
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
hData.move.value() == maxXDescription
TRUEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
dx < 0Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickflickable
4-124
1161 }
executed 132 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
132
1162 if (fuzzyLessThanOrEqualTo(minX, newX)) {
fuzzyLessThanO...To(minX, newX)Description
TRUEevaluated 118 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 504 times by 1 test
Evaluated by:
  • tst_qquickflickable
118-504
1163 newX = minX;-
1164 rejectX |= hData.pressPos == minX && hData.move.value() == minX && dx > 0;
hData.pressPos == minXDescription
TRUEevaluated 110 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
hData.move.value() == minXDescription
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickflickable
dx > 0Description
TRUEevaluated 78 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickflickable
4-110
1165 }
executed 118 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
118
1166 } else {
executed 622 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
622
1167 qreal vel = velocity.x() / QML_FLICK_OVERSHOOTFRICTION;-
1168 if (vel > 0. && vel > hData.velocity)
vel > 0.Description
TRUEevaluated 758 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
FALSEevaluated 912 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vel > hData.velocityDescription
TRUEevaluated 110 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
FALSEevaluated 648 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
110-912
1169 hData.velocity = qMin(velocity.x() / QML_FLICK_OVERSHOOTFRICTION, float(QML_FLICK_DEFAULTMAXVELOCITY));
executed 110 times by 5 tests: hData.velocity = qMin(velocity.x() / 8, float(2500));
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
110
1170 else if (vel < 0. && vel < hData.velocity)
vel < 0.Description
TRUEevaluated 678 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 882 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
vel < hData.velocityDescription
TRUEevaluated 77 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 601 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
77-882
1171 hData.velocity = qMax(velocity.x() / QML_FLICK_OVERSHOOTFRICTION, -float(QML_FLICK_DEFAULTMAXVELOCITY));
executed 77 times by 4 tests: hData.velocity = qMax(velocity.x() / 8, -float(2500));
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
77
1172 if (newX > minX) {
newX > minXDescription
TRUEevaluated 86 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 1584 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
86-1584
1173 // Overshoot beyond the left. But don't wait for momentum phase to end before returning to bounds.-
1174 if (momentum && hData.atBeginning) {
momentumDescription
TRUEnever evaluated
FALSEevaluated 86 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
hData.atBeginningDescription
TRUEnever evaluated
FALSEnever evaluated
0-86
1175 if (!hData.inRebound) {
!hData.inReboundDescription
TRUEnever evaluated
FALSEnever evaluated
0
1176 hData.inRebound = true;-
1177 q->returnToBounds();-
1178 }
never executed: end of block
0
1179 return;
never executed: return;
0
1180 }-
1181 if (velocitySensitiveOverBounds) {
velocitySensitiveOverBoundsDescription
TRUEnever evaluated
FALSEevaluated 86 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
0-86
1182 qreal overshoot = (newX - minX) * hData.velocity / QML_FLICK_DEFAULTMAXVELOCITY / QML_FLICK_OVERSHOOTFRICTION;-
1183 overshoot = QML_FLICK_OVERSHOOT * devicePixelRatio() * EaseOvershoot(overshoot / QML_FLICK_OVERSHOOT / devicePixelRatio());-
1184 newX = minX + overshoot;-
1185 } else {
never executed: end of block
0
1186 newX = minX + (newX - minX) / 2;-
1187 }
executed 86 times by 4 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
86
1188 } else if (newX < maxX && maxX - minX <= 0) {
newX < maxXDescription
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 1528 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
maxX - minX <= 0Description
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEnever evaluated
0-1528
1189 // Overshoot beyond the right. But don't wait for momentum phase to end before returning to bounds.-
1190 if (momentum && hData.atEnd) {
momentumDescription
TRUEnever evaluated
FALSEevaluated 56 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
hData.atEndDescription
TRUEnever evaluated
FALSEnever evaluated
0-56
1191 if (!hData.inRebound) {
!hData.inReboundDescription
TRUEnever evaluated
FALSEnever evaluated
0
1192 hData.inRebound = true;-
1193 q->returnToBounds();-
1194 }
never executed: end of block
0
1195 return;
never executed: return;
0
1196 }-
1197 if (velocitySensitiveOverBounds) {
velocitySensitiveOverBoundsDescription
TRUEnever evaluated
FALSEevaluated 56 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
0-56
1198 qreal overshoot = (newX - maxX) * hData.velocity / QML_FLICK_DEFAULTMAXVELOCITY / QML_FLICK_OVERSHOOTFRICTION;-
1199 overshoot = QML_FLICK_OVERSHOOT * devicePixelRatio() * EaseOvershoot(overshoot / QML_FLICK_OVERSHOOT / devicePixelRatio());-
1200 newX = maxX - overshoot;-
1201 } else {
never executed: end of block
0
1202 newX = maxX + (newX - maxX) / 2;-
1203 }
executed 56 times by 3 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
56
1204 }-
1205 }
executed 1670 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1670
1206-
1207 if (!rejectX && stealMouse && dx != 0.0 && dx != hData.previousDragDelta) {
!rejectXDescription
TRUEevaluated 2138 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 154 times by 1 test
Evaluated by:
  • tst_qquickflickable
stealMouseDescription
TRUEevaluated 1712 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 426 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
dx != 0.0Description
TRUEevaluated 1536 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 176 times by 1 test
Evaluated by:
  • tst_qquickflickable
dx != hData.previousDragDeltaDescription
TRUEevaluated 1278 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 258 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
154-2138
1208 clearTimeline();-
1209 hData.move.setValue(newX);-
1210 hMoved = true;-
1211 }
executed 1278 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
1278
1212-
1213 if (!rejectX && overThreshold)
!rejectXDescription
TRUEevaluated 2138 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 154 times by 1 test
Evaluated by:
  • tst_qquickflickable
overThresholdDescription
TRUEevaluated 2138 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
0-2138
1214 stealX = true;
executed 2138 times by 6 tests: stealX = true;
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
2138
1215-
1216 if ((newX >= minX && vData.pressPos == minX && vData.move.value() == minX && dx > 0)
newX >= minXDescription
TRUEevaluated 384 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 1908 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
vData.pressPos == minXDescription
TRUEevaluated 222 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 162 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
vData.move.value() == minXDescription
TRUEevaluated 214 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
dx > 0Description
TRUEevaluated 166 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 48 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
8-1908
1217 || (newX <= maxX && vData.pressPos == maxX && vData.move.value() == maxX && dx < 0)) {
newX <= maxXDescription
TRUEevaluated 282 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 1844 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
vData.pressPos == maxXDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 196 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
vData.move.value() == maxXDescription
TRUEevaluated 78 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickflickable
dx < 0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickflickable
8-1844
1218 keepX = false;-
1219 }
executed 224 times by 4 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
224
1220 }
executed 2292 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
2292
1221 hData.previousDragDelta = dx;-
1222 }
executed 2640 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
2640
1223-
1224 stealMouse = stealX || stealY;
stealXDescription
TRUEevaluated 3838 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 702 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
stealYDescription
TRUEevaluated 342 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 360 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
342-3838
1225 if (stealMouse) {
stealMouseDescription
TRUEevaluated 4180 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 360 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
360-4180
1226 if ((stealX && keepX) || (stealY && keepY))
stealXDescription
TRUEevaluated 3838 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 342 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
keepXDescription
TRUEevaluated 2188 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1650 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
stealYDescription
TRUEevaluated 1980 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickflickable
keepYDescription
TRUEevaluated 1820 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 160 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
12-3838
1227 q->setKeepMouseGrab(true);
executed 4008 times by 7 tests: q->setKeepMouseGrab(true);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
4008
1228 clearDelayedPress();-
1229 }
executed 4180 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
4180
1230-
1231 if (rejectY) {
rejectYDescription
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4400 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
140-4400
1232 vData.velocityBuffer.clear();-
1233 vData.velocity = 0;-
1234 }
executed 140 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
140
1235 if (rejectX) {
rejectXDescription
TRUEevaluated 154 times by 1 test
Evaluated by:
  • tst_qquickflickable
FALSEevaluated 4386 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
154-4386
1236 hData.velocityBuffer.clear();-
1237 hData.velocity = 0;-
1238 }
executed 154 times by 1 test: end of block
Executed by:
  • tst_qquickflickable
154
1239-
1240 if (momentum && !hData.flicking && !vData.flicking)
momentumDescription
TRUEnever evaluated
FALSEevaluated 4540 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
!hData.flickingDescription
TRUEnever evaluated
FALSEnever evaluated
!vData.flickingDescription
TRUEnever evaluated
FALSEnever evaluated
0-4540
1241 flickingStarted(hData.velocity != 0, vData.velocity != 0);
never executed: flickingStarted(hData.velocity != 0, vData.velocity != 0);
0
1242 draggingStarting();-
1243-
1244 if ((hMoved && !prevHMoved) || (vMoved && !prevVMoved))
hMovedDescription
TRUEevaluated 1560 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 2980 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
!prevHMovedDescription
TRUEevaluated 376 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1184 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vMovedDescription
TRUEevaluated 1811 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 2353 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
!prevVMovedDescription
TRUEevaluated 305 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1506 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
305-2980
1245 q->movementStarting();
executed 681 times by 7 tests: q->movementStarting();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
681
1246-
1247 lastPosTime = currentTimestamp;-
1248 if (q->yflick() && !rejectY)
q->yflick()Description
TRUEevaluated 3024 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1516 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
!rejectYDescription
TRUEevaluated 2884 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquickflickable
140-3024
1249 vData.addVelocitySample(velocity.y(), maxVelocity);
executed 2884 times by 6 tests: vData.addVelocitySample(velocity.y(), maxVelocity);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
2884
1250 if (q->xflick() && !rejectX)
q->xflick()Description
TRUEevaluated 2640 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1900 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
!rejectXDescription
TRUEevaluated 2486 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 154 times by 1 test
Evaluated by:
  • tst_qquickflickable
154-2640
1251 hData.addVelocitySample(velocity.x(), maxVelocity);
executed 2486 times by 6 tests: hData.addVelocitySample(velocity.x(), maxVelocity);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
2486
1252 lastPos = localPos;-
1253}
executed 4540 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
4540
1254-
1255void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event)-
1256{-
1257 Q_Q(QQuickFlickable);-
1258 if (!interactive || lastPosTime == -1)
!interactiveDescription
TRUEnever evaluated
FALSEevaluated 4624 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
lastPosTime == -1Description
TRUEnever evaluated
FALSEevaluated 4624 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-4624
1259 return;
never executed: return;
0
1260-
1261 qint64 currentTimestamp = computeCurrentTime(event);-
1262 QVector2D deltas = QVector2D(event->localPos() - pressPos);-
1263 bool overThreshold = false;-
1264 QVector2D velocity = QGuiApplicationPrivate::mouseEventVelocity(event);-
1265 // TODO guarantee that events always have velocity so that it never needs to be computed here-
1266 if (!(QGuiApplicationPrivate::mouseEventCaps(event) & QTouchDevice::Velocity)) {
!(QGuiApplicat...ice::Velocity)Description
TRUEevaluated 4624 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
0-4624
1267 qint64 lastTimestamp = (lastPos.isNull() ? lastPressTime : lastPosTime);
lastPos.isNull()Description
TRUEevaluated 864 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 3760 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
864-3760
1268 if (currentTimestamp == lastTimestamp)
currentTimesta... lastTimestampDescription
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_flickableinterop
FALSEevaluated 4540 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
84-4540
1269 return; // events are too close together: velocity would be infinite
executed 84 times by 1 test: return;
Executed by:
  • tst_flickableinterop
84
1270 qreal elapsed = qreal(currentTimestamp - lastTimestamp) / 1000.;-
1271 velocity = QVector2D(event->localPos() - (lastPos.isNull() ? pressPos : lastPos)) / elapsed;-
1272 }
executed 4540 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
4540
1273-
1274 if (q->yflick())
q->yflick()Description
TRUEevaluated 3024 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 1516 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
1516-3024
1275 overThreshold |= QQuickWindowPrivate::dragOverThreshold(deltas.y(), Qt::YAxis, event);
executed 3024 times by 6 tests: overThreshold |= QQuickWindowPrivate::dragOverThreshold(deltas.y(), Qt::YAxis, event);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
3024
1276 if (q->xflick())
q->xflick()Description
TRUEevaluated 2640 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 1900 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
1900-2640
1277 overThreshold |= QQuickWindowPrivate::dragOverThreshold(deltas.x(), Qt::XAxis, event);
executed 2640 times by 6 tests: overThreshold |= QQuickWindowPrivate::dragOverThreshold(deltas.x(), Qt::XAxis, event);
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
2640
1278-
1279 drag(currentTimestamp, event->type(), event->localPos(), deltas, overThreshold, false, false, velocity);-
1280}
executed 4540 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
4540
1281-
1282void QQuickFlickablePrivate::handleMouseReleaseEvent(QMouseEvent *event)-
1283{-
1284 Q_Q(QQuickFlickable);-
1285 stealMouse = false;-
1286 q->setKeepMouseGrab(false);-
1287 pressed = false;-
1288-
1289 // if we drag then pause before release we should not cause a flick.-
1290 qint64 elapsed = computeCurrentTime(event) - lastPosTime;-
1291-
1292 vData.updateVelocity();-
1293 hData.updateVelocity();-
1294-
1295 draggingEnding();-
1296-
1297 if (lastPosTime == -1)
lastPosTime == -1Description
TRUEevaluated 10 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 760 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
10-760
1298 return;
executed 10 times by 3 tests: return;
Executed by:
  • tst_flickableinterop
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
10
1299-
1300 hData.vTime = vData.vTime = timeline.time();-
1301-
1302 bool canBoost = false;-
1303-
1304 qreal vVelocity = 0;-
1305 if (elapsed < 100 && vData.velocity != 0.) {
elapsed < 100Description
TRUEevaluated 760 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
vData.velocity != 0.Description
TRUEevaluated 384 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 376 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
0-760
1306 vVelocity = (QGuiApplicationPrivate::mouseEventCaps(event) & QTouchDevice::Velocity)
(QGuiApplicati...ice::Velocity)Description
TRUEnever evaluated
FALSEevaluated 384 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
0-384
1307 ? QGuiApplicationPrivate::mouseEventVelocity(event).y() : vData.velocity;-
1308 }
executed 384 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
384
1309 if ((vData.atBeginning && vVelocity > 0.) || (vData.atEnd && vVelocity < 0.)) {
vData.atBeginningDescription
TRUEevaluated 348 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 412 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
vVelocity > 0.Description
TRUEevaluated 48 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 300 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
vData.atEndDescription
TRUEevaluated 303 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 409 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
vVelocity < 0.Description
TRUEevaluated 48 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 255 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
48-412
1310 vVelocity /= 2;-
1311 } else if (vData.continuousFlickVelocity != 0.0
executed 96 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
vData.continuo...elocity != 0.0Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 656 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
8-656
1312 && vData.viewSize/q->height() > QML_FLICK_MULTIFLICK_RATIO
vData.viewSize...>height() > 10Description
TRUEnever evaluated
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
0-8
1313 && ((vVelocity > 0) == (vData.continuousFlickVelocity > 0))
((vVelocity > ...Velocity > 0))Description
TRUEnever evaluated
FALSEnever evaluated
0
1314 && qAbs(vVelocity) > QML_FLICK_MULTIFLICK_THRESHOLD) {
qAbs(vVelocity) > 1250Description
TRUEnever evaluated
FALSEnever evaluated
0
1315 // accelerate flick for large view flicked quickly-
1316 canBoost = true;-
1317 }
never executed: end of block
0
1318-
1319 qreal hVelocity = 0;-
1320 if (elapsed < 100 && hData.velocity != 0.) {
elapsed < 100Description
TRUEevaluated 760 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
hData.velocity != 0.Description
TRUEevaluated 386 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 374 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
0-760
1321 hVelocity = (QGuiApplicationPrivate::mouseEventCaps(event) & QTouchDevice::Velocity)
(QGuiApplicati...ice::Velocity)Description
TRUEnever evaluated
FALSEevaluated 386 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
0-386
1322 ? QGuiApplicationPrivate::mouseEventVelocity(event).x() : hData.velocity;-
1323 }
executed 386 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
386
1324 if ((hData.atBeginning && hVelocity > 0.) || (hData.atEnd && hVelocity < 0.)) {
hData.atBeginningDescription
TRUEevaluated 388 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 372 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
hVelocity > 0.Description
TRUEevaluated 74 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 314 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
hData.atEndDescription
TRUEevaluated 336 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 350 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
hVelocity < 0.Description
TRUEevaluated 32 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 304 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
32-388
1325 hVelocity /= 2;-
1326 } else if (hData.continuousFlickVelocity != 0.0
executed 106 times by 4 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
hData.continuo...elocity != 0.0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
FALSEevaluated 646 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
8-646
1327 && hData.viewSize/q->width() > QML_FLICK_MULTIFLICK_RATIO
hData.viewSize/q->width() > 10Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickgridview
0-8
1328 && ((hVelocity > 0) == (hData.continuousFlickVelocity > 0))
((hVelocity > ...Velocity > 0))Description
TRUEnever evaluated
FALSEnever evaluated
0
1329 && qAbs(hVelocity) > QML_FLICK_MULTIFLICK_THRESHOLD) {
qAbs(hVelocity) > 1250Description
TRUEnever evaluated
FALSEnever evaluated
0
1330 // accelerate flick for large view flicked quickly-
1331 canBoost = true;-
1332 }
never executed: end of block
0
1333-
1334 flickBoost = canBoost ? qBound(1.0, flickBoost+0.25, QML_FLICK_MULTIFLICK_MAXBOOST) : 1.0;
canBoostDescription
TRUEnever evaluated
FALSEevaluated 760 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-760
1335-
1336 bool flickedVertically = false;-
1337 vVelocity *= flickBoost;-
1338 bool isVerticalFlickAllowed = q->yflick() && qAbs(vVelocity) > MinimumFlickVelocity && qAbs(event->localPos().y() - pressPos.y()) > FlickThreshold;
q->yflick()Description
TRUEevaluated 472 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 288 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
qAbs(vVelocity...mFlickVelocityDescription
TRUEevaluated 336 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 136 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
qAbs(event->lo...FlickThresholdDescription
TRUEevaluated 336 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
0-472
1339 if (isVerticalFlickAllowed) {
isVerticalFlickAllowedDescription
TRUEevaluated 336 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 424 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
336-424
1340 velocityTimeline.reset(vData.smoothVelocity);-
1341 vData.smoothVelocity.setValue(-vVelocity);-
1342 flickedVertically = flickY(vVelocity);-
1343 }
executed 336 times by 5 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
336
1344-
1345 bool flickedHorizontally = false;-
1346 hVelocity *= flickBoost;-
1347 bool isHorizontalFlickAllowed = q->xflick() && qAbs(hVelocity) > MinimumFlickVelocity && qAbs(event->localPos().x() - pressPos.x()) > FlickThreshold;
q->xflick()Description
TRUEevaluated 434 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 326 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
qAbs(hVelocity...mFlickVelocityDescription
TRUEevaluated 386 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
qAbs(event->lo...FlickThresholdDescription
TRUEevaluated 354 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_flickableinterop
32-434
1348 if (isHorizontalFlickAllowed) {
isHorizontalFlickAllowedDescription
TRUEevaluated 354 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 406 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
354-406
1349 velocityTimeline.reset(hData.smoothVelocity);-
1350 hData.smoothVelocity.setValue(-hVelocity);-
1351 flickedHorizontally = flickX(hVelocity);-
1352 }
executed 354 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
354
1353-
1354 if (!isVerticalFlickAllowed)
!isVerticalFlickAllowedDescription
TRUEevaluated 424 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 336 times by 5 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
336-424
1355 fixupY();
executed 424 times by 6 tests: fixupY();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
424
1356-
1357 if (!isHorizontalFlickAllowed)
!isHorizontalFlickAllowedDescription
TRUEevaluated 406 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 354 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
354-406
1358 fixupX();
executed 406 times by 6 tests: fixupX();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
406
1359-
1360 flickingStarted(flickedHorizontally, flickedVertically);-
1361 if (!isViewMoving())
!isViewMoving()Description
TRUEevaluated 60 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
FALSEevaluated 700 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
60-700
1362 q->movementEnding();
executed 60 times by 3 tests: q->movementEnding();
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquicklistview
60
1363}
executed 760 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
760
1364-
1365void QQuickFlickable::mousePressEvent(QMouseEvent *event)-
1366{-
1367 Q_D(QQuickFlickable);-
1368 if (d->interactive) {
d->interactiveDescription
TRUEevaluated 667 times by 5 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
8-667
1369 if (!d->pressed)
!d->pressedDescription
TRUEevaluated 357 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 310 times by 4 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
310-357
1370 d->handleMousePressEvent(event);
executed 357 times by 4 tests: d->handleMousePressEvent(event);
Executed by:
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
357
1371 event->accept();-
1372 } else {
executed 667 times by 5 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
667
1373 QQuickItem::mousePressEvent(event);-
1374 }
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
8
1375}-
1376-
1377void QQuickFlickable::mouseMoveEvent(QMouseEvent *event)-
1378{-
1379 Q_D(QQuickFlickable);-
1380 if (d->interactive) {
d->interactiveDescription
TRUEevaluated 4070 times by 6 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
0-4070
1381 d->handleMouseMoveEvent(event);-
1382 event->accept();-
1383 } else {
executed 4070 times by 6 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
4070
1384 QQuickItem::mouseMoveEvent(event);-
1385 }
never executed: end of block
0
1386}-
1387-
1388void QQuickFlickable::mouseReleaseEvent(QMouseEvent *event)-
1389{-
1390 Q_D(QQuickFlickable);-
1391 if (d->interactive) {
d->interactiveDescription
TRUEevaluated 724 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
0-724
1392 if (d->delayedPressEvent) {
d->delayedPressEventDescription
TRUEnever evaluated
FALSEevaluated 724 times by 7 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
0-724
1393 d->replayDelayedPress();-
1394-
1395 // Now send the release-
1396 if (window() && window()->mouseGrabberItem()) {
window()Description
TRUEnever evaluated
FALSEnever evaluated
window()->mouseGrabberItem()Description
TRUEnever evaluated
FALSEnever evaluated
0
1397 QPointF localPos = window()->mouseGrabberItem()->mapFromScene(event->windowPos());-
1398 QScopedPointer<QMouseEvent> mouseEvent(QQuickWindowPrivate::cloneMouseEvent(event, &localPos));-
1399 QCoreApplication::sendEvent(window(), mouseEvent.data());-
1400 }
never executed: end of block
0
1401-
1402 // And the event has been consumed-
1403 d->stealMouse = false;-
1404 d->pressed = false;-
1405 return;
never executed: return;
0
1406 }-
1407-
1408 d->handleMouseReleaseEvent(event);-
1409 event->accept();-
1410 } else {
executed 724 times by 7 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
724
1411 QQuickItem::mouseReleaseEvent(event);-
1412 }
never executed: end of block
0
1413}-
1414-
1415#if QT_CONFIG(wheelevent)-
1416void QQuickFlickable::wheelEvent(QWheelEvent *event)-
1417{-
1418 Q_D(QQuickFlickable);-
1419 if (!d->interactive) {
!d->interactiveDescription
TRUEnever evaluated
FALSEnever evaluated
0
1420 QQuickItem::wheelEvent(event);-
1421 return;
never executed: return;
0
1422 }-
1423 event->setAccepted(false);-
1424 qint64 currentTimestamp = d->computeCurrentTime(event);-
1425 switch (event->phase()) {-
1426 case Qt::ScrollBegin:
never executed: case Qt::ScrollBegin:
0
1427 d->scrollingPhase = true;-
1428 d->accumulatedWheelPixelDelta = QVector2D();-
1429 d->vData.velocity = 0;-
1430 d->hData.velocity = 0;-
1431 d->timer.start();-
1432 d->maybeBeginDrag(currentTimestamp, event->posF());-
1433 break;
never executed: break;
0
1434 case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse
never executed: case Qt::NoScrollPhase:
0
1435 case Qt::ScrollUpdate:
never executed: case Qt::ScrollUpdate:
0
1436 if (d->scrollingPhase)
d->scrollingPhaseDescription
TRUEnever evaluated
FALSEnever evaluated
0
1437 d->pressed = true;
never executed: d->pressed = true;
0
1438#ifdef Q_OS_MACOS-
1439 // TODO eliminate this timer when ScrollMomentum has been added-
1440 d->movementEndingTimer.start(MovementEndingTimerInterval, this);-
1441#endif-
1442 break;
never executed: break;
0
1443 case Qt::ScrollEnd:
never executed: case Qt::ScrollEnd:
0
1444 // TODO most of this should be done at transition to ScrollMomentum phase,-
1445 // then do what the movementEndingTimer triggers at transition to ScrollEnd phase-
1446 d->pressed = false;-
1447 d->scrollingPhase = false;-
1448 d->draggingEnding();-
1449 event->accept();-
1450 returnToBounds();-
1451 d->lastPosTime = -1;-
1452#ifdef Q_OS_MACOS-
1453 d->movementEndingTimer.start(MovementEndingTimerInterval, this);-
1454#endif-
1455 return;
never executed: return;
0
1456 }-
1457-
1458 if (event->source() == Qt::MouseEventNotSynthesized || event->pixelDelta().isNull()) {
event->source(...NotSynthesizedDescription
TRUEnever evaluated
FALSEnever evaluated
event->pixelDelta().isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
1459 // physical mouse wheel, so use angleDelta-
1460 int xDelta = event->angleDelta().x();-
1461 int yDelta = event->angleDelta().y();-
1462 if (yflick() && yDelta != 0) {
yflick()Description
TRUEnever evaluated
FALSEnever evaluated
yDelta != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1463 bool valid = false;-
1464 if (yDelta > 0 && contentY() > -minYExtent()) {
yDelta > 0Description
TRUEnever evaluated
FALSEnever evaluated
contentY() > -minYExtent()Description
TRUEnever evaluated
FALSEnever evaluated
0
1465 d->vData.velocity = qMax(yDelta*2 - d->vData.smoothVelocity.value(), qreal(d->maxVelocity/4));-
1466 valid = true;-
1467 } else if (yDelta < 0 && contentY() < -maxYExtent()) {
never executed: end of block
yDelta < 0Description
TRUEnever evaluated
FALSEnever evaluated
contentY() < -maxYExtent()Description
TRUEnever evaluated
FALSEnever evaluated
0
1468 d->vData.velocity = qMin(yDelta*2 - d->vData.smoothVelocity.value(), qreal(-d->maxVelocity/4));-
1469 valid = true;-
1470 }
never executed: end of block
0
1471 if (valid) {
validDescription
TRUEnever evaluated
FALSEnever evaluated
0
1472 d->flickY(d->vData.velocity);-
1473 d->flickingStarted(false, true);-
1474 if (d->vData.flicking) {
d->vData.flickingDescription
TRUEnever evaluated
FALSEnever evaluated
0
1475 d->vMoved = true;-
1476 movementStarting();-
1477 }
never executed: end of block
0
1478 event->accept();-
1479 }
never executed: end of block
0
1480 }
never executed: end of block
0
1481 if (xflick() && xDelta != 0) {
xflick()Description
TRUEnever evaluated
FALSEnever evaluated
xDelta != 0Description
TRUEnever evaluated
FALSEnever evaluated