OpenCoverage

qquicktaphandler.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/handlers/qquicktaphandler.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4const QLoggingCategory &lcTapHandler() { static const QLoggingCategory category("qt.quick.handler.tap"); return
executed 358 times by 3 tests: return category;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
category;
executed 358 times by 3 tests: return category;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
}
358
5-
6qreal QQuickTapHandler::m_multiTapInterval(0.0);-
7-
8int QQuickTapHandler::m_mouseMultiClickDistanceSquared(-1);-
9int QQuickTapHandler::m_touchMultiTapDistanceSquared(-1);-
10QQuickTapHandler::QQuickTapHandler(QObject *parent)-
11 : QQuickSinglePointHandler(parent)-
12 , m_pressed(false)-
13 , m_gesturePolicy(DragThreshold)-
14 , m_tapCount(0)-
15 , m_longPressThreshold(-1)-
16 , m_lastTapTimestamp(0.0)-
17{-
18 if (m_mouseMultiClickDistanceSquared < 0
m_mouseMultiCl...nceSquared < 0Description
TRUEevaluated 8 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 596 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
) {
8-596
19 m_multiTapInterval = (static_cast<QGuiApplication *>(QCoreApplication::instance()))->styleHints()->mouseDoubleClickInterval() / 1000.0;-
20 m_mouseMultiClickDistanceSquared = QGuiApplicationPrivate::platformTheme()->-
21 themeHint(QPlatformTheme::MouseDoubleClickDistance).toInt();-
22 m_mouseMultiClickDistanceSquared *= m_mouseMultiClickDistanceSquared;-
23 m_touchMultiTapDistanceSquared = QGuiApplicationPrivate::platformTheme()->-
24 themeHint(QPlatformTheme::TouchDoubleTapDistance).toInt();-
25 m_touchMultiTapDistanceSquared *= m_touchMultiTapDistanceSquared;-
26 }
executed 8 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
8
27}
executed 604 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
604
28-
29QQuickTapHandler::~QQuickTapHandler()-
30{-
31}-
32-
33static bool dragOverThreshold(const QQuickEventPoint *point)-
34{-
35 QPointF delta = point->scenePosition() - point->scenePressPosition();-
36 return
executed 2496 times by 3 tests: return (QQuickWindowPrivate::dragOverThreshold(delta.x(), Qt::XAxis, point) || QQuickWindowPrivate::dragOverThreshold(delta.y(), Qt::YAxis, point));
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
(QQuickWindowPrivate::dragOverThreshold(delta.x(), Qt::XAxis, point) ||
executed 2496 times by 3 tests: return (QQuickWindowPrivate::dragOverThreshold(delta.x(), Qt::XAxis, point) || QQuickWindowPrivate::dragOverThreshold(delta.y(), Qt::YAxis, point));
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2496
37 QQuickWindowPrivate::dragOverThreshold(delta.y(), Qt::YAxis, point));
executed 2496 times by 3 tests: return (QQuickWindowPrivate::dragOverThreshold(delta.x(), Qt::XAxis, point) || QQuickWindowPrivate::dragOverThreshold(delta.y(), Qt::YAxis, point));
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2496
38}-
39-
40bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)-
41{-
42-
43-
44-
45-
46 bool ret = false;-
47 switch (point->state()) {-
48 case
executed 1168 times by 3 tests: case QQuickEventPoint::Pressed:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
QQuickEventPoint::Pressed:
executed 1168 times by 3 tests: case QQuickEventPoint::Pressed:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
1168
49 case
executed 1546 times by 3 tests: case QQuickEventPoint::Released:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
QQuickEventPoint::Released:
executed 1546 times by 3 tests: case QQuickEventPoint::Released:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
1546
50 ret = parentContains(point);-
51 break;
executed 2714 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2714
52 case
executed 2816 times by 3 tests: case QQuickEventPoint::Updated:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
QQuickEventPoint::Updated:
executed 2816 times by 3 tests: case QQuickEventPoint::Updated:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2816
53 switch (m_gesturePolicy) {-
54 case
executed 2496 times by 3 tests: case DragThreshold:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
DragThreshold:
executed 2496 times by 3 tests: case DragThreshold:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2496
55 ret = !dragOverThreshold(point);-
56 break;
executed 2496 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2496
57 case
executed 156 times by 2 tests: case WithinBounds:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
WithinBounds:
executed 156 times by 2 tests: case WithinBounds:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
156
58 ret = parentContains(point);-
59 break;
executed 156 times by 2 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
156
60 case
executed 164 times by 2 tests: case ReleaseWithinBounds:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
ReleaseWithinBounds:
executed 164 times by 2 tests: case ReleaseWithinBounds:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
164
61 ret = point->pointId() == this->point().id();-
62 break;
executed 164 times by 2 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
164
63 }-
64 break;
executed 2816 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
2816
65 case
executed 262 times by 2 tests: case QQuickEventPoint::Stationary:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
QQuickEventPoint::Stationary:
executed 262 times by 2 tests: case QQuickEventPoint::Stationary:
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
262
66-
67-
68-
69-
70 break;
executed 262 times by 2 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
262
71 }-
72-
73-
74-
75-
76 if (!ret
!retDescription
TRUEevaluated 3442 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 2350 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
&& point->pointId() == this->point().id()
point->pointId...->point().id()Description
TRUEevaluated 596 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 2846 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
&& point->state() != QQuickEventPoint::Stationary
point->state()...nt::StationaryDescription
TRUEevaluated 538 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
)
58-3442
77 setPressed(false, true, point);
executed 538 times by 3 tests: setPressed(false, true, point);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
538
78 return
executed 5792 times by 3 tests: return ret;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
ret;
executed 5792 times by 3 tests: return ret;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
5792
79}-
80-
81void QQuickTapHandler::handleEventPoint(QQuickEventPoint *point)-
82{-
83 switch (point->state()) {-
84 case
executed 156 times by 3 tests: case QQuickEventPoint::Pressed:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
QQuickEventPoint::Pressed:
executed 156 times by 3 tests: case QQuickEventPoint::Pressed:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
156
85 setPressed(true, false, point);-
86 break;
executed 156 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
156
87 case
executed 120 times by 3 tests: case QQuickEventPoint::Released:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
QQuickEventPoint::Released:
executed 120 times by 3 tests: case QQuickEventPoint::Released:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
120
88 if ((
(point->pointe...= Qt::NoButtonDescription
TRUEevaluated 120 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEnever evaluated
point->pointerEvent()->buttons() & acceptedButtons()) == Qt::NoButton
(point->pointe...= Qt::NoButtonDescription
TRUEevaluated 120 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEnever evaluated
)
0-120
89 setPressed(false, false, point);
executed 120 times by 3 tests: setPressed(false, false, point);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
120
90 break;
executed 120 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
120
91 default
executed 680 times by 3 tests: default:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
:
executed 680 times by 3 tests: default:
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
680
92 break;
executed 680 times by 3 tests: break;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
680
93 }-
94}-
95qreal QQuickTapHandler::longPressThreshold() const-
96{-
97 return
executed 64 times by 2 tests: return longPressThresholdMilliseconds() / 1000.0;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
longPressThresholdMilliseconds() / 1000.0;
executed 64 times by 2 tests: return longPressThresholdMilliseconds() / 1000.0;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
64
98}-
99-
100void QQuickTapHandler::setLongPressThreshold(qreal longPressThreshold)-
101{-
102 int ms = qRound(longPressThreshold * 1000);-
103 if (m_longPressThreshold == ms
m_longPressThreshold == msDescription
TRUEnever evaluated
FALSEevaluated 222 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
)
0-222
104 return;
never executed: return;
0
105-
106 m_longPressThreshold = ms;-
107 longPressThresholdChanged();-
108}
executed 222 times by 2 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
222
109-
110int QQuickTapHandler::longPressThresholdMilliseconds() const-
111{-
112 return
executed 212 times by 3 tests: return (m_longPressThreshold < 0 ? QGuiApplication::styleHints()->mousePressAndHoldInterval() : m_longPressThreshold);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
(m_longPressThreshold < 0 ? QGuiApplication::styleHints()->mousePressAndHoldInterval() : m_longPressThreshold);
executed 212 times by 3 tests: return (m_longPressThreshold < 0 ? QGuiApplication::styleHints()->mousePressAndHoldInterval() : m_longPressThreshold);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
212
113}-
114-
115void QQuickTapHandler::timerEvent(QTimerEvent *event)-
116{-
117 if (event->timerId() == m_longPressTimer.timerId()
event->timerId...imer.timerId()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
FALSEnever evaluated
) {
0-4
118 m_longPressTimer.stop();-
119 for (bool qt_category_enabled = lcTapHandler().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
; qt_category_enabled = false) QMessageLogger(__FILE__, 206, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "longPressed";
never executed: QMessageLogger(__FILE__, 206, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "longPressed";
0-4
120 longPressed();-
121 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktaphandler
4
122}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktaphandler
4
123void QQuickTapHandler::setGesturePolicy(QQuickTapHandler::GesturePolicy gesturePolicy)-
124{-
125 if (m_gesturePolicy == gesturePolicy
m_gesturePolic... gesturePolicyDescription
TRUEevaluated 448 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 146 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
)
146-448
126 return;
executed 448 times by 3 tests: return;
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
448
127-
128 m_gesturePolicy = gesturePolicy;-
129 gesturePolicyChanged();-
130}
executed 146 times by 2 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
146
131void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *point)-
132{-
133 if (m_pressed != press
m_pressed != pressDescription
TRUEevaluated 290 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 614 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
) {
290-614
134 for (bool qt_category_enabled = lcTapHandler().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 290 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
; qt_category_enabled = false) QMessageLogger(__FILE__, 281, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "pressed" << m_pressed << "->" << press << (cancel ? "CANCEL" : "") << point;
never executed: QMessageLogger(__FILE__, 281, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "pressed" << m_pressed << "->" << press << (cancel ? "CANCEL" : "") << point;
0-290
135 m_pressed = press;-
136 connectPreRenderSignal(press);-
137 updateTimeHeld();-
138 if (press
pressDescription
TRUEevaluated 148 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 142 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
) {
142-148
139 m_longPressTimer.start(longPressThresholdMilliseconds(), this);-
140 m_holdTimer.start();-
141 }
executed 148 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
else {
148
142 m_longPressTimer.stop();-
143 m_holdTimer.invalidate();-
144 }
executed 142 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
142
145 if (press
pressDescription
TRUEevaluated 148 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 142 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
) {
142-148
146-
147 if (m_gesturePolicy == DragThreshold
m_gesturePolic... DragThresholdDescription
TRUEevaluated 98 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 50 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
)
50-98
148 setPassiveGrab(point, press);
executed 98 times by 3 tests: setPassiveGrab(point, press);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
98
149 else-
150 setExclusiveGrab(point, press);
executed 50 times by 2 tests: setExclusiveGrab(point, press);
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
50
151 }-
152 if (!cancel
!cancelDescription
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 78 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
&& !press
!pressDescription
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 148 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
&& parentContains(point)
parentContains(point)Description
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEnever evaluated
) {
0-212
153 if (point->timeHeld() < longPressThreshold()
point->timeHel...essThreshold()Description
TRUEevaluated 60 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
) {
4-60
154-
155 qreal ts = point->pointerEvent()->timestamp() / 1000.0;-
156 if (ts - m_lastTapTimestamp < m_multiTapInterval
ts - m_lastTap...ltiTapIntervalDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 44 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
&&
16-44
157 QVector2D(point->scenePosition() - m_lastTapPos).lengthSquared() <
QVector2D(poin...stanceSquared)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
2-14
158 (point->pointerEvent()->device()->type() == QQuickPointerDevice::Mouse ?
QVector2D(poin...stanceSquared)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
2-14
159 m_mouseMultiClickDistanceSquared : m_touchMultiTapDistanceSquared)
QVector2D(poin...stanceSquared)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
)
2-14
160 ++
executed 2 times by 1 test: ++m_tapCount;
Executed by:
  • tst_qquicktaphandler
m_tapCount;
executed 2 times by 1 test: ++m_tapCount;
Executed by:
  • tst_qquicktaphandler
2
161 else-
162 m_tapCount = 1;
executed 58 times by 2 tests: m_tapCount = 1;
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
58
163 for (bool qt_category_enabled = lcTapHandler().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
; qt_category_enabled = false) QMessageLogger(__FILE__, 310, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "tapped" << m_tapCount << "times";
never executed: QMessageLogger(__FILE__, 310, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "tapped" << m_tapCount << "times";
0-60
164 tapped();-
165 tapCountChanged();-
166 if (m_tapCount == 1
m_tapCount == 1Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
)
2-58
167 singleTapped();
executed 58 times by 2 tests: singleTapped();
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
58
168 else if (m_tapCount == 2
m_tapCount == 2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
FALSEnever evaluated
)
0-2
169 doubleTapped();
executed 2 times by 1 test: doubleTapped();
Executed by:
  • tst_qquicktaphandler
2
170 m_lastTapTimestamp = ts;-
171 m_lastTapPos = point->scenePosition();-
172 }
executed 60 times by 2 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
else {
60
173 for (bool qt_category_enabled = lcTapHandler().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktaphandler
; qt_category_enabled = false) QMessageLogger(__FILE__, 320, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "tap threshold" << longPressThreshold() << "exceeded:" << point->timeHeld();
never executed: QMessageLogger(__FILE__, 320, __PRETTY_FUNCTION__, lcTapHandler().categoryName()).debug() << objectName() << "tap threshold" << longPressThreshold() << "exceeded:" << point->timeHeld();
0-4
174 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktaphandler
4
175 }-
176 pressedChanged();-
177 if (!press
!pressDescription
TRUEevaluated 142 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 148 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
&& m_gesturePolicy != DragThreshold
m_gesturePolic... DragThresholdDescription
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 96 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
) {
46-148
178-
179 setExclusiveGrab(point, press);-
180 }
executed 46 times by 2 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
46
181 if (cancel
cancelDescription
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 212 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
)
78-212
182 canceled(point);
executed 78 times by 3 tests: canceled(point);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
78
183 }
executed 290 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
290
184}
executed 904 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
904
185-
186void QQuickTapHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point)-
187{-
188 QQuickSinglePointHandler::onGrabChanged(grabber, stateChange, point);-
189 bool isCanceled = stateChange == QQuickEventPoint::CancelGrabExclusive
stateChange ==...lGrabExclusiveDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_flickableinterop
FALSEevaluated 268 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
|| stateChange == QQuickEventPoint::CancelGrabPassive
stateChange ==...celGrabPassiveDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickdraghandler
FALSEevaluated 244 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
;
8-268
190 if (grabber == this
grabber == thisDescription
TRUEevaluated 254 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
&& (isCanceled
isCanceledDescription
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
FALSEevaluated 222 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
|| point->state() == QQuickEventPoint::Released
point->state()...oint::ReleasedDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquicktaphandler
FALSEevaluated 164 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
))
22-254
191 setPressed(false, isCanceled, point);
executed 90 times by 3 tests: setPressed(false, isCanceled, point);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
90
192}
executed 276 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
276
193-
194void QQuickTapHandler::connectPreRenderSignal(bool conn)-
195{-
196 if (conn
connDescription
TRUEevaluated 148 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
FALSEevaluated 142 times by 3 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
)
142-148
197 connect(parentItem()->window(), &QQuickWindow::beforeSynchronizing, this, &QQuickTapHandler::updateTimeHeld);
executed 148 times by 3 tests: connect(parentItem()->window(), &QQuickWindow::beforeSynchronizing, this, &QQuickTapHandler::updateTimeHeld);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
148
198 else-
199 disconnect(parentItem()->window(), &QQuickWindow::beforeSynchronizing, this, &QQuickTapHandler::updateTimeHeld);
executed 142 times by 3 tests: disconnect(parentItem()->window(), &QQuickWindow::beforeSynchronizing, this, &QQuickTapHandler::updateTimeHeld);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
142
200}-
201-
202void QQuickTapHandler::updateTimeHeld()-
203{-
204 timeHeldChanged();-
205}
executed 594 times by 3 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
594
206-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0