OpenCoverage

qquickmultipointtoucharea.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickmultipointtoucharea.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static bool qmlVisualTouchDebugging() { static enum { Yes, No, Unknown } status = Unknown; if (status == Unknown
status == UnknownDescription
TRUEevaluated 8 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) { status = No; if (__builtin_expect(!!(!qEnvironmentVariableIsEmpty("QML_VISUAL_TOUCH_DEBUGGING")), false)
__builtin_expe...ING")), false)Description
TRUEnever evaluated
FALSEevaluated 8 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
) { const QByteArray v = qgetenv("QML_VISUAL_TOUCH_DEBUGGING"); if (v != "0"
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
&& v != "false"
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
) status = Yes;
never executed: status = Yes;
}
never executed: end of block
}
executed 8 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
return
executed 62 times by 4 tests: return status == Yes;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
status == Yes;
executed 62 times by 4 tests: return status == Yes;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
}
0-62
5void QQuickTouchPoint::setPointId(int id)-
6{-
7 if (_id == id
_id == idDescription
TRUEevaluated 70 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 186 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
70-186
8 return;
executed 70 times by 3 tests: return;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
70
9 _id = id;-
10 pointIdChanged();-
11}
executed 186 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
186
12void QQuickTouchPoint::setX(qreal x)-
13{-
14 if (_x == x
_x == xDescription
TRUEevaluated 214 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 284 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
214-284
15 return;
executed 214 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
214
16 _x = x;-
17 xChanged();-
18}
executed 284 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
284
19-
20void QQuickTouchPoint::setY(qreal y)-
21{-
22 if (_y == y
_y == yDescription
TRUEevaluated 244 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
244-254
23 return;
executed 244 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
244
24 _y = y;-
25 yChanged();-
26}
executed 254 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
254
27void QQuickTouchPoint::setEllipseDiameters(const QSizeF &d)-
28{-
29 if (_ellipseDiameters == d
_ellipseDiameters == dDescription
TRUEevaluated 380 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 106 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
106-380
30 return;
executed 380 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
380
31 _ellipseDiameters = d;-
32 ellipseDiametersChanged();-
33}
executed 106 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
106
34void QQuickTouchPoint::setPressure(qreal pressure)-
35{-
36 if (_pressure == pressure
_pressure == pressureDescription
TRUEevaluated 286 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 200 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
200-286
37 return;
executed 286 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
286
38 _pressure = pressure;-
39 pressureChanged();-
40}
executed 200 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
200
41void QQuickTouchPoint::setRotation(qreal r)-
42{-
43 if (_rotation == r
_rotation == rDescription
TRUEevaluated 486 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
)
0-486
44 return;
executed 486 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
486
45 _rotation = r;-
46 rotationChanged();-
47}
never executed: end of block
0
48-
49void QQuickTouchPoint::setVelocity(const QVector2D &velocity)-
50{-
51 if (_velocity == velocity
_velocity == velocityDescription
TRUEevaluated 486 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
)
0-486
52 return;
executed 486 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
486
53 _velocity = velocity;-
54 velocityChanged();-
55}
never executed: end of block
0
56void QQuickTouchPoint::setArea(const QRectF &area)-
57{-
58 if (_area == area
_area == areaDescription
TRUEevaluated 166 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 320 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
166-320
59 return;
executed 166 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
166
60 _area = area;-
61 areaChanged();-
62}
executed 320 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
320
63-
64-
65-
66-
67-
68-
69void QQuickTouchPoint::setPressed(bool pressed)-
70{-
71 if (_pressed == pressed
_pressed == pressedDescription
TRUEnever evaluated
FALSEevaluated 288 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
0-288
72 return;
never executed: return;
0
73 _pressed = pressed;-
74 pressedChanged();-
75}
executed 288 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
288
76void QQuickTouchPoint::setStartX(qreal startX)-
77{-
78 if (_startX == startX
_startX == startXDescription
TRUEevaluated 354 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 144 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
144-354
79 return;
executed 354 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
354
80 _startX = startX;-
81 startXChanged();-
82}
executed 144 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
144
83-
84void QQuickTouchPoint::setStartY(qreal startY)-
85{-
86 if (_startY == startY
_startY == startYDescription
TRUEevaluated 360 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 138 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
138-360
87 return;
executed 360 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
360
88 _startY = startY;-
89 startYChanged();-
90}
executed 138 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
138
91-
92-
93-
94-
95-
96-
97-
98void QQuickTouchPoint::setPreviousX(qreal previousX)-
99{-
100 if (_previousX == previousX
_previousX == previousXDescription
TRUEevaluated 250 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 248 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
248-250
101 return;
executed 250 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
250
102 _previousX = previousX;-
103 previousXChanged();-
104}
executed 248 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
248
105-
106void QQuickTouchPoint::setPreviousY(qreal previousY)-
107{-
108 if (_previousY == previousY
_previousY == previousYDescription
TRUEevaluated 278 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 220 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
220-278
109 return;
executed 278 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
278
110 _previousY = previousY;-
111 previousYChanged();-
112}
executed 220 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
220
113void QQuickTouchPoint::setSceneX(qreal sceneX)-
114{-
115 if (_sceneX == sceneX
_sceneX == sceneXDescription
TRUEevaluated 214 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 284 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
214-284
116 return;
executed 214 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
214
117 _sceneX = sceneX;-
118 sceneXChanged();-
119}
executed 284 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
284
120-
121void QQuickTouchPoint::setSceneY(qreal sceneY)-
122{-
123 if (_sceneY == sceneY
_sceneY == sceneYDescription
TRUEevaluated 244 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
244-254
124 return;
executed 244 times by 2 tests: return;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
244
125 _sceneY = sceneY;-
126 sceneYChanged();-
127}
executed 254 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
254
128void QQuickTouchPoint::setUniqueId(const QPointingDeviceUniqueId &id)-
129{-
130 _uniqueId = id;-
131 uniqueIdChanged();-
132}
executed 486 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
486
133QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(QQuickItem *parent)-
134 : QQuickItem(parent),-
135 _minimumTouchPoints(0),-
136 _maximumTouchPoints(0x7fffffff),-
137 _stealMouse(false),-
138 _mouseEnabled(true)-
139{-
140 setAcceptedMouseButtons(Qt::LeftButton);-
141 setFiltersChildMouseEvents(true);-
142 if (qmlVisualTouchDebugging()
qmlVisualTouchDebugging()Description
TRUEnever evaluated
FALSEevaluated 62 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
) {
0-62
143 setFlag(QQuickItem::ItemHasContents);-
144 }
never executed: end of block
0
145 setAcceptTouchEvents(true);-
146-
147-
148-
149}
executed 62 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
62
150-
151QQuickMultiPointTouchArea::~QQuickMultiPointTouchArea()-
152{-
153 clearTouchLists();-
154 for (QObject *obj : qAsConst(_touchPoints)) {-
155 QQuickTouchPoint *dtp = static_cast<QQuickTouchPoint*>(obj);-
156 if (!dtp->isQmlDefined()
!dtp->isQmlDefined()Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
0-8
157 delete dtp;
never executed: delete dtp;
0
158 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
8
159}
executed 62 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
62
160int QQuickMultiPointTouchArea::minimumTouchPoints() const-
161{-
162 return
executed 2 times by 1 test: return _minimumTouchPoints;
Executed by:
  • tst_qquickmultipointtoucharea
_minimumTouchPoints;
executed 2 times by 1 test: return _minimumTouchPoints;
Executed by:
  • tst_qquickmultipointtoucharea
2
163}-
164-
165void QQuickMultiPointTouchArea::setMinimumTouchPoints(int num)-
166{-
167 if (_minimumTouchPoints == num
_minimumTouchPoints == numDescription
TRUEnever evaluated
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickmultipointtoucharea
)
0-30
168 return;
never executed: return;
0
169 _minimumTouchPoints = num;-
170 minimumTouchPointsChanged();-
171}
executed 30 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmultipointtoucharea
30
172-
173int QQuickMultiPointTouchArea::maximumTouchPoints() const-
174{-
175 return
executed 2 times by 1 test: return _maximumTouchPoints;
Executed by:
  • tst_qquickmultipointtoucharea
_maximumTouchPoints;
executed 2 times by 1 test: return _maximumTouchPoints;
Executed by:
  • tst_qquickmultipointtoucharea
2
176}-
177-
178void QQuickMultiPointTouchArea::setMaximumTouchPoints(int num)-
179{-
180 if (_maximumTouchPoints == num
_maximumTouchPoints == numDescription
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickmultipointtoucharea
)
0-52
181 return;
never executed: return;
0
182 _maximumTouchPoints = num;-
183 maximumTouchPointsChanged();-
184}
executed 52 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmultipointtoucharea
52
185void QQuickMultiPointTouchArea::setMouseEnabled(bool arg)-
186{-
187 if (_mouseEnabled != arg
_mouseEnabled != argDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-4
188 _mouseEnabled = arg;-
189 if (_mouseTouchPoint && !arg
!argDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
190 _mouseTouchPoint = nullptr;
never executed: _mouseTouchPoint = nullptr;
0
191 mouseEnabledChanged();-
192 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
4
193}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
4
194-
195void QQuickMultiPointTouchArea::touchEvent(QTouchEvent *event)-
196{-
197 switch (event->type()) {-
198 case
executed 66 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchBegin:
executed 66 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
66
199 case
executed 106 times by 2 tests: case QEvent::TouchUpdate:
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
QEvent::TouchUpdate:
executed 106 times by 2 tests: case QEvent::TouchUpdate:
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
106
200 case
executed 32 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchEnd:
executed 32 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
{
32
201-
202 QQuickWindow *c = window();-
203 QQuickItem *grabber = c
cDescription
TRUEevaluated 204 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-204
204 if (grabber
grabberDescription
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
&& grabber != this
grabber != thisDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& grabber->keepMouseGrab()
grabber->keepMouseGrab()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& grabber->isEnabled()
grabber->isEnabled()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-142
205 QQuickItem *item = this;-
206 while ((
(item = item->parentItem())Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
item = item->parentItem())
(item = item->parentItem())Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
2-4
207 if (item == grabber
item == grabberDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
0-4
208 return;
never executed: return;
0
209 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
4
210 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
2
211 updateTouchData(event);-
212 if (event->type() == QEvent::TouchEnd
event->type() ...vent::TouchEndDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 172 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
32-172
213 ungrab();
executed 32 times by 1 test: ungrab();
Executed by:
  • tst_qquickmultipointtoucharea
32
214 break;
executed 204 times by 2 tests: break;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
204
215 }-
216 case
never executed: case QEvent::TouchCancel:
QEvent::TouchCancel:
never executed: case QEvent::TouchCancel:
0
217 ungrab();-
218 break;
never executed: break;
0
219 default
never executed: default:
:
never executed: default:
0
220 QQuickItem::touchEvent(event);-
221 break;
never executed: break;
0
222 }-
223}-
224-
225void QQuickMultiPointTouchArea::grabGesture()-
226{-
227 _stealMouse = true;-
228-
229 grabMouse();-
230 setKeepMouseGrab(true);-
231-
232 QVector<int> ids;-
233 ids.reserve(_touchPoints.size());-
234 for (auto it = _touchPoints.keyBegin(), end = _touchPoints.keyEnd(); it != end
it != endDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
; ++it) {
6-16
235 if (*
*it != -1Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
it != -1
*it != -1Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
2-14
236 ids.append(*it);
executed 14 times by 1 test: ids.append(*it);
Executed by:
  • tst_qquickmultipointtoucharea
14
237 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
16
238 grabTouchPoints(ids);-
239 setKeepTouchGrab(true);-
240}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
6
241-
242void QQuickMultiPointTouchArea::updateTouchData(QEvent *event)-
243{-
244 bool ended = false;-
245 bool moved = false;-
246 bool started = false;-
247 bool isMouseEvent = false;-
248-
249 clearTouchLists();-
250 QList<QTouchEvent::TouchPoint> touchPoints;-
251-
252 switch (event->type()) {-
253 case
executed 78 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchBegin:
executed 78 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
78
254 case
executed 128 times by 2 tests: case QEvent::TouchUpdate:
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
QEvent::TouchUpdate:
executed 128 times by 2 tests: case QEvent::TouchUpdate:
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
128
255 case
executed 36 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchEnd:
executed 36 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
36
256 touchPoints = static_cast<QTouchEvent*>(event)->touchPoints();-
257 break;
executed 242 times by 2 tests: break;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
242
258 case
executed 12 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonPress:
executed 12 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
12
259 case
executed 34 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseMove:
executed 34 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
34
260 case
executed 10 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonRelease:
executed 10 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
{
10
261 QMouseEvent *me = static_cast<QMouseEvent*>(event);-
262 _mouseQpaTouchPoint.setPos(me->localPos());-
263 _mouseQpaTouchPoint.setScenePos(me->windowPos());-
264 _mouseQpaTouchPoint.setScreenPos(me->screenPos());-
265 if (event->type() == QEvent::MouseMove
event->type() ...ent::MouseMoveDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
22-34
266 _mouseQpaTouchPoint.setState(Qt::TouchPointMoved);
executed 34 times by 1 test: _mouseQpaTouchPoint.setState(Qt::TouchPointMoved);
Executed by:
  • tst_qquickmultipointtoucharea
34
267 else if (event->type() == QEvent::MouseButtonRelease
event->type() ...eButtonReleaseDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
10-12
268 _mouseQpaTouchPoint.setState(Qt::TouchPointReleased);
executed 10 times by 1 test: _mouseQpaTouchPoint.setState(Qt::TouchPointReleased);
Executed by:
  • tst_qquickmultipointtoucharea
10
269 else {-
270 addTouchPoint(me);-
271 started = true;-
272 _mouseQpaTouchPoint.setState(Qt::TouchPointPressed);-
273 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
12
274 touchPoints << _mouseQpaTouchPoint;-
275 isMouseEvent = true;-
276 break;
executed 56 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
56
277 }-
278 default
never executed: default:
:
never executed: default:
0
279 QMessageLogger(__FILE__, 620, __PRETTY_FUNCTION__).warning("updateTouchData: unhandled event type %d", event->type());-
280 break;
never executed: break;
0
281 }-
282-
283 if (!isMouseEvent
!isMouseEventDescription
TRUEevaluated 242 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& _mouseTouchPoint) {
56-242
284 QQuickWindow *c = window();-
285 if (c
cDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
&& c->mouseGrabberItem() == this
c->mouseGrabberItem() == thisDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
)
0-28
286 touchPoints << _mouseQpaTouchPoint;
executed 28 times by 1 test: touchPoints << _mouseQpaTouchPoint;
Executed by:
  • tst_qquickmultipointtoucharea
28
287 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
28
288 int numTouchPoints = touchPoints.count();-
289-
290 for (const QTouchEvent::TouchPoint &p : qAsConst(touchPoints)) {-
291 Qt::TouchPointState touchPointState = p.state();-
292 int id = p.id();-
293 if (touchPointState & Qt::TouchPointReleased
touchPointStat...hPointReleasedDescription
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 494 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
96-494
294 QQuickTouchPoint* dtp = static_cast<QQuickTouchPoint*>(_touchPoints.value(id));-
295 if (!dtp
!dtpDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 82 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
14-82
296 continue;
executed 14 times by 1 test: continue;
Executed by:
  • tst_qquickmultipointtoucharea
14
297 updateTouchPoint(dtp, &p);-
298 dtp->setPressed(false);-
299 _releasedTouchPoints.append(dtp);-
300 _touchPoints.remove(id);-
301 ended = true;-
302 }
executed 82 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
82
303 }
executed 576 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
576
304 if (numTouchPoints >= _minimumTouchPoints
numTouchPoints...mumTouchPointsDescription
TRUEevaluated 250 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& numTouchPoints <= _maximumTouchPoints
numTouchPoints...mumTouchPointsDescription
TRUEevaluated 240 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
10-250
305 for (const QTouchEvent::TouchPoint &p : qAsConst(touchPoints)) {-
306 Qt::TouchPointState touchPointState = p.state();-
307 int id = p.id();-
308 if (touchPointState & Qt::TouchPointReleased
touchPointStat...hPointReleasedDescription
TRUEevaluated 84 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 404 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
84-404
309-
310 }
executed 84 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
else if (!_touchPoints.contains(id)
!_touchPoints.contains(id)Description
TRUEevaluated 136 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 268 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
84-268
311-
312 addTouchPoint(&p);-
313 started = true;-
314 }
executed 136 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
else if (touchPointState & Qt::TouchPointMoved
touchPointStat...ouchPointMovedDescription
TRUEevaluated 212 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
56-212
315 QQuickTouchPoint* dtp = static_cast<QQuickTouchPoint*>(_touchPoints.value(id));-
316 ((dtp) ? static_cast<void>(0) : qt_assert("dtp", __FILE__, 657));-
317 _movedTouchPoints.append(dtp);-
318 updateTouchPoint(dtp,&p);-
319 moved = true;-
320 }
executed 212 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
else {
212
321 QQuickTouchPoint* dtp = static_cast<QQuickTouchPoint*>(_touchPoints.value(id));-
322 ((dtp) ? static_cast<void>(0) : qt_assert("dtp", __FILE__, 663));-
323 updateTouchPoint(dtp,&p);-
324 }
executed 56 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
56
325 }-
326-
327-
328 if (!_stealMouse
!_stealMouseDescription
TRUEevaluated 218 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
22-218
329 bool offerGrab = false;-
330 const int dragThreshold = QGuiApplication::styleHints()->startDragDistance();-
331 for (const QTouchEvent::TouchPoint &p : qAsConst(touchPoints)) {-
332 if (p.state() == Qt::TouchPointReleased
p.state() == Q...hPointReleasedDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 280 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
68-280
333 continue;
executed 68 times by 1 test: continue;
Executed by:
  • tst_qquickmultipointtoucharea
68
334 const QPointF &currentPos = p.scenePos();-
335 const QPointF &startPos = p.startScenePos();-
336 if (qAbs(currentPos.x() - startPos.x()) > dragThreshold
qAbs(currentPo... dragThresholdDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 214 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
66-214
337 offerGrab = true;
executed 66 times by 2 tests: offerGrab = true;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
66
338 else if (qAbs(currentPos.y() - startPos.y()) > dragThreshold
qAbs(currentPo... dragThresholdDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 198 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
16-198
339 offerGrab = true;
executed 16 times by 1 test: offerGrab = true;
Executed by:
  • tst_qquickmultipointtoucharea
16
340 if (offerGrab
offerGrabDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 198 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
82-198
341 break;
executed 82 times by 2 tests: break;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
82
342 }
executed 198 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
198
343-
344 if (offerGrab
offerGrabDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 136 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
82-136
345 QQuickGrabGestureEvent event;-
346 event._touchPoints = _touchPoints.values();-
347 gestureStarted(&event);-
348 if (event.wantsGrab()
event.wantsGrab()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 76 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
6-76
349 grabGesture();
executed 6 times by 1 test: grabGesture();
Executed by:
  • tst_qquickmultipointtoucharea
6
350 }
executed 82 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
82
351 }
executed 218 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
218
352-
353 if (ended
endedDescription
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 190 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
50-190
354 released(_releasedTouchPoints);
executed 50 times by 2 tests: released(_releasedTouchPoints);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
50
355 if (moved
movedDescription
TRUEevaluated 98 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
98-142
356 updated(_movedTouchPoints);
executed 98 times by 2 tests: updated(_movedTouchPoints);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
98
357 if (started
startedDescription
TRUEevaluated 102 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 138 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
102-138
358 pressed(_pressedTouchPoints);
executed 102 times by 2 tests: pressed(_pressedTouchPoints);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
102
359 if (ended
endedDescription
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 190 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
|| moved
movedDescription
TRUEevaluated 90 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 100 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
|| started
startedDescription
TRUEevaluated 92 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) touchUpdated(_touchPoints.values());
executed 232 times by 2 tests: touchUpdated(_touchPoints.values());
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
8-232
360 }
executed 240 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
240
361}
executed 298 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
298
362-
363void QQuickMultiPointTouchArea::clearTouchLists()-
364{-
365 for (QObject *obj : qAsConst(_releasedTouchPoints)) {-
366 QQuickTouchPoint *dtp = static_cast<QQuickTouchPoint*>(obj);-
367 if (!dtp->isQmlDefined()
!dtp->isQmlDefined()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 54 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
20-54
368 _touchPoints.remove(dtp->pointId());-
369 delete dtp;-
370 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
else {
20
371 dtp->setInUse(false);-
372 }
executed 54 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
54
373 }-
374 _releasedTouchPoints.clear();-
375 _pressedTouchPoints.clear();-
376 _movedTouchPoints.clear();-
377}
executed 396 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
396
378-
379void QQuickMultiPointTouchArea::addTouchPoint(const QTouchEvent::TouchPoint *p)-
380{-
381 QQuickTouchPoint *dtp = nullptr;-
382 for (QQuickTouchPoint* tp : qAsConst(_touchPrototypes)) {-
383 if (!tp->inUse()
!tp->inUse()Description
TRUEevaluated 90 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 78 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
78-90
384 tp->setInUse(true);-
385 dtp = tp;-
386 break;
executed 90 times by 2 tests: break;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
90
387 }-
388 }
executed 78 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
78
389-
390 if (dtp == nullptr
dtp == nullptrDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 90 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
46-90
391 dtp = new QQuickTouchPoint(false);
executed 46 times by 1 test: dtp = new QQuickTouchPoint(false);
Executed by:
  • tst_qquickmultipointtoucharea
46
392 dtp->setPointId(p->id());-
393 updateTouchPoint(dtp,p);-
394 dtp->setPressed(true);-
395 _touchPoints.insert(p->id(),dtp);-
396 _pressedTouchPoints.append(dtp);-
397}
executed 136 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
136
398-
399void QQuickMultiPointTouchArea::addTouchPoint(const QMouseEvent *e)-
400{-
401 QQuickTouchPoint *dtp = nullptr;-
402 for (QQuickTouchPoint *tp : qAsConst(_touchPrototypes))-
403 if (!tp->inUse()
!tp->inUse()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
4-8
404 tp->setInUse(true);-
405 dtp = tp;-
406 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
8
407 }-
408-
409 if (dtp == nullptr
dtp == nullptrDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
4-8
410 dtp = new QQuickTouchPoint(false);
executed 4 times by 1 test: dtp = new QQuickTouchPoint(false);
Executed by:
  • tst_qquickmultipointtoucharea
4
411 updateTouchPoint(dtp, e);-
412 dtp->setPressed(true);-
413 _touchPoints.insert(-1, dtp);-
414 _pressedTouchPoints.append(dtp);-
415 _mouseTouchPoint = dtp;-
416}
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
12
417void QQuickMultiPointTouchArea::addTouchPrototype(QQuickTouchPoint *prototype)-
418{-
419 int id = _touchPrototypes.count();-
420 prototype->setPointId(id);-
421 _touchPrototypes.insert(id, prototype);-
422}
executed 120 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
120
423-
424void QQuickMultiPointTouchArea::updateTouchPoint(QQuickTouchPoint *dtp, const QTouchEvent::TouchPoint *p)-
425{-
426-
427-
428 dtp->setUniqueId(p->uniqueId());-
429 dtp->setX(p->pos().x());-
430 dtp->setY(p->pos().y());-
431 dtp->setEllipseDiameters(p->ellipseDiameters());-
432 dtp->setPressure(p->pressure());-
433 dtp->setRotation(p->rotation());-
434 dtp->setVelocity(p->velocity());-
435 dtp->setArea(p->rect());-
436 dtp->setStartX(p->startPos().x());-
437 dtp->setStartY(p->startPos().y());-
438 dtp->setPreviousX(p->lastPos().x());-
439 dtp->setPreviousY(p->lastPos().y());-
440 dtp->setSceneX(p->scenePos().x());-
441 dtp->setSceneY(p->scenePos().y());-
442}
executed 486 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
486
443-
444void QQuickMultiPointTouchArea::updateTouchPoint(QQuickTouchPoint *dtp, const QMouseEvent *e)-
445{-
446 dtp->setPreviousX(dtp->x());-
447 dtp->setPreviousY(dtp->y());-
448 dtp->setX(e->localPos().x());-
449 dtp->setY(e->localPos().y());-
450 if (e->type() == QEvent::MouseButtonPress
e->type() == Q...useButtonPressDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-12
451 dtp->setStartX(e->localPos().x());-
452 dtp->setStartY(e->localPos().y());-
453 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
12
454 dtp->setSceneX(e->windowPos().x());-
455 dtp->setSceneY(e->windowPos().y());-
456}
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
12
457-
458void QQuickMultiPointTouchArea::mousePressEvent(QMouseEvent *event)-
459{-
460 if (!isEnabled()
!isEnabled()Description
TRUEnever evaluated
FALSEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !_mouseEnabled
!_mouseEnabledDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| event->button() != Qt::LeftButton
event->button(...Qt::LeftButtonDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
0-44
461 QQuickItem::mousePressEvent(event);-
462 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickmultipointtoucharea
4
463 }-
464-
465 _stealMouse = false;-
466 setKeepMouseGrab(false);-
467 event->setAccepted(true);-
468 _mousePos = event->localPos();-
469-
470 if (event->source() != Qt::MouseEventNotSynthesized
event->source(...NotSynthesizedDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
16-24
471 return;
executed 24 times by 1 test: return;
Executed by:
  • tst_qquickmultipointtoucharea
24
472-
473 if (_touchPoints.count() >= _minimumTouchPoints - 1
_touchPoints.c...ouchPoints - 1Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
&& _touchPoints.count() < _maximumTouchPoints
_touchPoints.c...mumTouchPointsDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
0-16
474 updateTouchData(event);-
475 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
12
476}
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
16
477-
478void QQuickMultiPointTouchArea::mouseMoveEvent(QMouseEvent *event)-
479{-
480 if (!isEnabled()
!isEnabled()Description
TRUEnever evaluated
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !_mouseEnabled
!_mouseEnabledDescription
TRUEnever evaluated
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
0-42
481 QQuickItem::mouseMoveEvent(event);-
482 return;
never executed: return;
0
483 }-
484-
485 if (event->source() != Qt::MouseEventNotSynthesized
event->source(...NotSynthesizedDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
8-34
486 return;
executed 8 times by 1 test: return;
Executed by:
  • tst_qquickmultipointtoucharea
8
487-
488 _movedTouchPoints.clear();-
489 updateTouchData(event);-
490}
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
34
491-
492void QQuickMultiPointTouchArea::mouseReleaseEvent(QMouseEvent *event)-
493{-
494 _stealMouse = false;-
495 if (!isEnabled()
!isEnabled()Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !_mouseEnabled
!_mouseEnabledDescription
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
0-22
496 QQuickItem::mouseReleaseEvent(event);-
497 return;
never executed: return;
0
498 }-
499-
500 if (event->source() != Qt::MouseEventNotSynthesized
event->source(...NotSynthesizedDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
6-16
501 return;
executed 6 times by 1 test: return;
Executed by:
  • tst_qquickmultipointtoucharea
6
502-
503 if (_mouseTouchPoint
_mouseTouchPointDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
6-10
504 updateTouchData(event);-
505 _mouseTouchPoint->setInUse(false);-
506 _releasedTouchPoints.removeAll(_mouseTouchPoint);-
507 _mouseTouchPoint = nullptr;-
508 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
10
509-
510 QQuickWindow *c = window();-
511 if (c
cDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
&& c->mouseGrabberItem() == this
c->mouseGrabberItem() == thisDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
)
0-16
512 ungrabMouse();
executed 16 times by 1 test: ungrabMouse();
Executed by:
  • tst_qquickmultipointtoucharea
16
513 setKeepMouseGrab(false);-
514}
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
16
515-
516void QQuickMultiPointTouchArea::ungrab()-
517{-
518 _stealMouse = false;-
519 setKeepMouseGrab(false);-
520 setKeepTouchGrab(false);-
521 ungrabTouchPoints();-
522-
523 if (_touchPoints.count()
_touchPoints.count()Description
TRUEevaluated 36 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
FALSEevaluated 96 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
) {
36-96
524 for (QObject *obj : qAsConst(_touchPoints))-
525 static_cast<
executed 58 times by 2 tests: static_cast<QQuickTouchPoint*>(obj)->setPressed(false);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
QQuickTouchPoint*>(obj)->setPressed(false);
executed 58 times by 2 tests: static_cast<QQuickTouchPoint*>(obj)->setPressed(false);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
58
526 canceled(_touchPoints.values());-
527 clearTouchLists();-
528 for (QObject *obj : qAsConst(_touchPoints)) {-
529 QQuickTouchPoint *dtp = static_cast<QQuickTouchPoint*>(obj);-
530 if (!dtp->isQmlDefined()
!dtp->isQmlDefined()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
)
28-30
531 delete dtp;
executed 28 times by 1 test: delete dtp;
Executed by:
  • tst_qquickmultipointtoucharea
28
532 else-
533 dtp->setInUse(false);
executed 30 times by 2 tests: dtp->setInUse(false);
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
30
534 }-
535 _touchPoints.clear();-
536 touchUpdated(QList<QObject*>());-
537 }
executed 36 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
36
538}
executed 132 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
132
539-
540void QQuickMultiPointTouchArea::mouseUngrabEvent()-
541{-
542 ungrab();-
543}
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
26
544-
545void QQuickMultiPointTouchArea::touchUngrabEvent()-
546{-
547 ungrab();-
548}
executed 66 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
66
549-
550bool QQuickMultiPointTouchArea::sendMouseEvent(QMouseEvent *event)-
551{-
552 QPointF localPos = mapFromScene(event->windowPos());-
553-
554 QQuickWindow *c = window();-
555 QQuickItem *grabber = c
cDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-42
556 bool stealThisEvent = _stealMouse;-
557 if ((stealThisEvent
stealThisEventDescription
TRUEnever evaluated
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| contains(localPos)
contains(localPos)Description
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) && (!grabber
!grabberDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !grabber->keepMouseGrab()
!grabber->keepMouseGrab()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)) {
0-42
558 QMouseEvent mouseEvent(event->type(), localPos, event->windowPos(), event->screenPos(),-
559 event->button(), event->buttons(), event->modifiers());-
560 mouseEvent.setAccepted(false);-
561 QGuiApplicationPrivate::setMouseEventCapsAndVelocity(&mouseEvent,-
562 QGuiApplicationPrivate::mouseEventCaps(event),-
563 QGuiApplicationPrivate::mouseEventVelocity(event));-
564 QGuiApplicationPrivate::setMouseEventSource(&mouseEvent, Qt::MouseEventSynthesizedByQt);-
565-
566 switch (mouseEvent.type()) {-
567 case
executed 8 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseMove:
executed 8 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
8
568 mouseMoveEvent(&mouseEvent);-
569 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
8
570 case
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonPress:
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
24
571 mousePressEvent(&mouseEvent);-
572 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
24
573 case
executed 6 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonRelease:
executed 6 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
6
574 mouseReleaseEvent(&mouseEvent);-
575 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
6
576 default
never executed: default:
:
never executed: default:
0
577 break;
never executed: break;
0
578 }-
579 grabber = c
cDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-38
580 if (grabber
grabberDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& stealThisEvent
stealThisEventDescription
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& !grabber->keepMouseGrab()
!grabber->keepMouseGrab()Description
TRUEnever evaluated
FALSEnever evaluated
&& grabber != this
grabber != thisDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-24
581 grabMouse();
never executed: grabMouse();
0
582-
583 return
executed 38 times by 1 test: return stealThisEvent;
Executed by:
  • tst_qquickmultipointtoucharea
stealThisEvent;
executed 38 times by 1 test: return stealThisEvent;
Executed by:
  • tst_qquickmultipointtoucharea
38
584 }-
585 if (event->type() == QEvent::MouseButtonRelease
event->type() ...eButtonReleaseDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
) {
2
586 _stealMouse = false;-
587 if (c
cDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
&& c->mouseGrabberItem() == this
c->mouseGrabberItem() == thisDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
0-2
588 ungrabMouse();
never executed: ungrabMouse();
0
589 setKeepMouseGrab(false);-
590 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
2
591 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
4
592}-
593-
594bool QQuickMultiPointTouchArea::childMouseEventFilter(QQuickItem *receiver, QEvent *event)-
595{-
596 if (!isEnabled()
!isEnabled()Description
TRUEnever evaluated
FALSEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !isVisible()
!isVisible()Description
TRUEnever evaluated
FALSEevaluated 84 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
0-84
597 return
never executed: return QQuickItem::childMouseEventFilter(receiver, event);
QQuickItem::childMouseEventFilter(receiver, event);
never executed: return QQuickItem::childMouseEventFilter(receiver, event);
0
598 switch (event->type()) {-
599 case
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonPress:
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmultipointtoucharea
24
600 case
executed 10 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseMove:
executed 10 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmultipointtoucharea
10
601 case
executed 8 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::MouseButtonRelease:
executed 8 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmultipointtoucharea
8
602 return
executed 42 times by 1 test: return sendMouseEvent(static_cast<QMouseEvent *>(event));
Executed by:
  • tst_qquickmultipointtoucharea
sendMouseEvent(static_cast<QMouseEvent *>(event));
executed 42 times by 1 test: return sendMouseEvent(static_cast<QMouseEvent *>(event));
Executed by:
  • tst_qquickmultipointtoucharea
42
603 break;
dead code: break;
-
604 case
executed 12 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchBegin:
executed 12 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
12
605 case
executed 24 times by 1 test: case QEvent::TouchUpdate:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchUpdate:
executed 24 times by 1 test: case QEvent::TouchUpdate:
Executed by:
  • tst_qquickmultipointtoucharea
24
606 if (!shouldFilter(event)
!shouldFilter(event)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
2-34
607 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
2
608 updateTouchData(event);-
609 return
executed 34 times by 1 test: return _stealMouse;
Executed by:
  • tst_qquickmultipointtoucharea
_stealMouse;
executed 34 times by 1 test: return _stealMouse;
Executed by:
  • tst_qquickmultipointtoucharea
34
610 case
executed 6 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchEnd:
executed 6 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
{
6
611 if (!shouldFilter(event)
!shouldFilter(event)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)
2-4
612 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
2
613 updateTouchData(event);-
614 ungrab();-
615 }-
616 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
4
617 default
never executed: default:
:
never executed: default:
0
618 break;
never executed: break;
0
619 }-
620 return
executed 4 times by 1 test: return QQuickItem::childMouseEventFilter(receiver, event);
Executed by:
  • tst_qquickmultipointtoucharea
QQuickItem::childMouseEventFilter(receiver, event);
executed 4 times by 1 test: return QQuickItem::childMouseEventFilter(receiver, event);
Executed by:
  • tst_qquickmultipointtoucharea
4
621}-
622-
623bool QQuickMultiPointTouchArea::shouldFilter(QEvent *event)-
624{-
625 QQuickWindow *c = window();-
626 QQuickItem *grabber = c
cDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-42
627 bool disabledItem = grabber
grabberDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
&& !grabber->isEnabled()
!grabber->isEnabled()Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
;
0-22
628 bool stealThisEvent = _stealMouse;-
629 bool containsPoint = false;-
630 if (!stealThisEvent
!stealThisEventDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-42
631 switch (event->type()) {-
632 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
633 case
never executed: case QEvent::MouseMove:
QEvent::MouseMove:
never executed: case QEvent::MouseMove:
0
634 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
{
0
635 QMouseEvent *me = static_cast<QMouseEvent*>(event);-
636 containsPoint = contains(mapFromScene(me->windowPos()));-
637 }-
638 break;
never executed: break;
0
639 case
executed 12 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchBegin:
executed 12 times by 1 test: case QEvent::TouchBegin:
Executed by:
  • tst_qquickmultipointtoucharea
12
640 case
executed 24 times by 1 test: case QEvent::TouchUpdate:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchUpdate:
executed 24 times by 1 test: case QEvent::TouchUpdate:
Executed by:
  • tst_qquickmultipointtoucharea
24
641 case
executed 6 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
QEvent::TouchEnd:
executed 6 times by 1 test: case QEvent::TouchEnd:
Executed by:
  • tst_qquickmultipointtoucharea
{
6
642 QTouchEvent *te = static_cast<QTouchEvent*>(event);-
643 for (const QTouchEvent::TouchPoint &point : te->touchPoints()) {-
644 if (contains(mapFromScene(point.scenePos()))
contains(mapFr...t.scenePos()))Description
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-42
645 containsPoint = true;-
646 break;
executed 42 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
42
647 }-
648 }
never executed: end of block
0
649 }-
650 break;
executed 42 times by 1 test: break;
Executed by:
  • tst_qquickmultipointtoucharea
42
651 default
never executed: default:
:
never executed: default:
0
652 break;
never executed: break;
0
653 }-
654 }-
655 if ((stealThisEvent
stealThisEventDescription
TRUEnever evaluated
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| containsPoint
containsPointDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) && (!grabber
!grabberDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| !grabber->keepMouseGrab()
!grabber->keepMouseGrab()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
|| disabledItem
disabledItemDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmultipointtoucharea
)) {
0-42
656 return
executed 38 times by 1 test: return true;
Executed by:
  • tst_qquickmultipointtoucharea
true;
executed 38 times by 1 test: return true;
Executed by:
  • tst_qquickmultipointtoucharea
38
657 }-
658 ungrab();-
659 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickmultipointtoucharea
4
660}-
661-
662QSGNode *QQuickMultiPointTouchArea::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)-
663{-
664 (void)data;;-
665-
666 if (!qmlVisualTouchDebugging()
!qmlVisualTouchDebugging()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
667 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
668-
669 QSGInternalRectangleNode *rectangle = static_cast<QSGInternalRectangleNode *>(oldNode);-
670 if (!rectangle
!rectangleDescription
TRUEnever evaluated
FALSEnever evaluated
) rectangle = QQuickItemPrivate::get(this)->sceneGraphContext()->createInternalRectangleNode();
never executed: rectangle = QQuickItemPrivate::get(this)->sceneGraphContext()->createInternalRectangleNode();
0
671-
672 rectangle->setRect(QRectF(0, 0, width(), height()));-
673 rectangle->setColor(QColor(255, 0, 0, 50));-
674 rectangle->update();-
675 return
never executed: return rectangle;
rectangle;
never executed: return rectangle;
0
676}-
677-
678-
679-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0