Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | QElapsedTimer QWindowSystemInterfacePrivate::eventTime; | - |
6 | bool QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = false; | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue; | - |
14 | | - |
15 | extern QPointer<QWindow> qt_last_mouse_receiver; | - |
16 | void QWindowSystemInterface::handleEnterEvent(QWindow *tlw, const QPointF &local, const QPointF &global) | - |
17 | { | - |
18 | if (tlw) { partially evaluated: tlw yes Evaluation Count:1670 | no Evaluation Count:0 |
| 0-1670 |
19 | QWindowSystemInterfacePrivate::EnterEvent *e = new QWindowSystemInterfacePrivate::EnterEvent(tlw, local, global); | - |
20 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
21 | } executed: } Execution Count:1670 | 1670 |
22 | } executed: } Execution Count:1670 | 1670 |
23 | | - |
24 | void QWindowSystemInterface::handleLeaveEvent(QWindow *tlw) | - |
25 | { | - |
26 | QWindowSystemInterfacePrivate::LeaveEvent *e = new QWindowSystemInterfacePrivate::LeaveEvent(tlw); | - |
27 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
28 | } executed: } Execution Count:760 | 760 |
29 | void QWindowSystemInterface::handleEnterLeaveEvent(QWindow *enter, QWindow *leave, const QPointF &local, const QPointF& global) | - |
30 | { | - |
31 | bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents; | - |
32 | if (wasSynchronous) partially evaluated: wasSynchronous no Evaluation Count:0 | yes Evaluation Count:502 |
| 0-502 |
33 | setSynchronousWindowsSystemEvents(false); never executed: setSynchronousWindowsSystemEvents(false); | 0 |
34 | handleLeaveEvent(leave); | - |
35 | handleEnterEvent(enter, local, global); | - |
36 | if (wasSynchronous) { partially evaluated: wasSynchronous no Evaluation Count:0 | yes Evaluation Count:502 |
| 0-502 |
37 | flushWindowSystemEvents(); | - |
38 | setSynchronousWindowsSystemEvents(true); | - |
39 | } | 0 |
40 | } executed: } Execution Count:502 | 502 |
41 | | - |
42 | void QWindowSystemInterface::handleWindowActivated(QWindow *tlw) | - |
43 | { | - |
44 | QWindowSystemInterfacePrivate::ActivatedWindowEvent *e = new QWindowSystemInterfacePrivate::ActivatedWindowEvent(tlw); | - |
45 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
46 | } executed: } Execution Count:1927 | 1927 |
47 | | - |
48 | void QWindowSystemInterface::handleWindowStateChanged(QWindow *tlw, Qt::WindowState newState) | - |
49 | { | - |
50 | QWindowSystemInterfacePrivate::WindowStateChangedEvent *e = | - |
51 | new QWindowSystemInterfacePrivate::WindowStateChangedEvent(tlw, newState); | - |
52 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
53 | } executed: } Execution Count:1496 | 1496 |
54 | | - |
55 | void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &newRect) | - |
56 | { | - |
57 | QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect); | - |
58 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
59 | } executed: } Execution Count:1927 | 1927 |
60 | | - |
61 | void QWindowSystemInterface::handleCloseEvent(QWindow *tlw) | - |
62 | { | - |
63 | if (tlw) { | 0 |
64 | QWindowSystemInterfacePrivate::CloseEvent *e = | - |
65 | new QWindowSystemInterfacePrivate::CloseEvent(tlw); | - |
66 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
67 | } | 0 |
68 | } | 0 |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
75 | void QWindowSystemInterface::handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) | - |
76 | { | - |
77 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
78 | handleMouseEvent(w, time, local, global, b, mods); | - |
79 | } executed: } Execution Count:121 | 121 |
80 | | - |
81 | void QWindowSystemInterface::handleMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) | - |
82 | { | - |
83 | QWindowSystemInterfacePrivate::MouseEvent * e = | - |
84 | new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp, local, global, b, mods); | - |
85 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
86 | } executed: } Execution Count:545 | 545 |
87 | | - |
88 | void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) | - |
89 | { | - |
90 | const unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
91 | handleFrameStrutMouseEvent(w, time, local, global, b, mods); | - |
92 | } | 0 |
93 | | - |
94 | void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) | - |
95 | { | - |
96 | QWindowSystemInterfacePrivate::MouseEvent * e = | - |
97 | new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp, | - |
98 | QWindowSystemInterfacePrivate::FrameStrutMouse, | - |
99 | local, global, b, mods); | - |
100 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
101 | } | 0 |
102 | | - |
103 | bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, | - |
104 | const QString & text, bool autorep, ushort count) | - |
105 | { | - |
106 | unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
107 | return tryHandleShortcutEvent(w, timestamp, k, mods, text, autorep, count); executed: return tryHandleShortcutEvent(w, timestamp, k, mods, text, autorep, count); Execution Count:3 | 3 |
108 | } | - |
109 | | - |
110 | bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, | - |
111 | const QString & text, bool autorep, ushort count) | - |
112 | { | - |
113 | | - |
114 | QGuiApplicationPrivate::modifier_buttons = mods; | - |
115 | | - |
116 | QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count); | - |
117 | qevent.setTimestamp(timestamp); | - |
118 | return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); executed: return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); Execution Count:3 | 3 |
119 | } | - |
120 | | - |
121 | bool QWindowSystemInterface::tryHandleExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, | - |
122 | quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, | - |
123 | const QString &text, bool autorep, ushort count) | - |
124 | { | - |
125 | unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
126 | return tryHandleExtendedShortcutEvent(w, timestamp, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count); never executed: return tryHandleExtendedShortcutEvent(w, timestamp, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count); | 0 |
127 | } | - |
128 | | - |
129 | bool QWindowSystemInterface::tryHandleExtendedShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, | - |
130 | quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, | - |
131 | const QString &text, bool autorep, ushort count) | - |
132 | { | - |
133 | | - |
134 | QGuiApplicationPrivate::modifier_buttons = mods; | - |
135 | | - |
136 | QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count); | - |
137 | qevent.setTimestamp(timestamp); | - |
138 | return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); never executed: return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); | 0 |
139 | } | - |
140 | | - |
141 | | - |
142 | void QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) { | - |
143 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
144 | handleKeyEvent(w, time, t, k, mods, text, autorep, count); | - |
145 | } executed: } Execution Count:72 | 72 |
146 | | - |
147 | void QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) | - |
148 | { | - |
149 | QWindowSystemInterfacePrivate::KeyEvent * e = | - |
150 | new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count); | - |
151 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
152 | } executed: } Execution Count:72 | 72 |
153 | | - |
154 | void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *w, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, | - |
155 | quint32 nativeScanCode, quint32 nativeVirtualKey, | - |
156 | quint32 nativeModifiers, | - |
157 | const QString& text, bool autorep, | - |
158 | ushort count) | - |
159 | { | - |
160 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
161 | handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, | - |
162 | text, autorep, count); | - |
163 | } | 0 |
164 | | - |
165 | void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type type, int key, | - |
166 | Qt::KeyboardModifiers modifiers, | - |
167 | quint32 nativeScanCode, quint32 nativeVirtualKey, | - |
168 | quint32 nativeModifiers, | - |
169 | const QString& text, bool autorep, | - |
170 | ushort count) | - |
171 | { | - |
172 | QWindowSystemInterfacePrivate::KeyEvent * e = | - |
173 | new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers, | - |
174 | nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count); | - |
175 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
176 | } | 0 |
177 | | - |
178 | void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods) { | - |
179 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
180 | handleWheelEvent(w, time, local, global, d, o, mods); | - |
181 | } | 0 |
182 | | - |
183 | void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods) | - |
184 | { | - |
185 | QPoint point = (o == Qt::Vertical) ? QPoint(0, d) : QPoint(d, 0); never evaluated: (o == Qt::Vertical) | 0 |
186 | handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods); | - |
187 | } | 0 |
188 | | - |
189 | void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods) | - |
190 | { | - |
191 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
192 | handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods); | - |
193 | } executed: } Execution Count:3 | 3 |
194 | | - |
195 | void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods) | - |
196 | { | - |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | | - |
202 | | - |
203 | | - |
204 | QWindowSystemInterfacePrivate::WheelEvent *e; | - |
205 | | - |
206 | if (angleDelta.isNull()) partially evaluated: angleDelta.isNull() no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
207 | return; | 0 |
208 | | - |
209 | | - |
210 | if (angleDelta.y() != 0 && angleDelta.x() == 0) { partially evaluated: angleDelta.y() != 0 yes Evaluation Count:3 | no Evaluation Count:0 |
partially evaluated: angleDelta.x() == 0 yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
211 | e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods); | - |
212 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
213 | return; executed: return; Execution Count:3 | 3 |
214 | } | - |
215 | | - |
216 | | - |
217 | if (angleDelta.y() == 0 && angleDelta.x() != 0) { never evaluated: angleDelta.y() == 0 never evaluated: angleDelta.x() != 0 | 0 |
218 | e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods); | - |
219 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
220 | return; | 0 |
221 | } | - |
222 | | - |
223 | | - |
224 | | - |
225 | | - |
226 | e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods); | - |
227 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
228 | | - |
229 | | - |
230 | | - |
231 | e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods); | - |
232 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
233 | } | 0 |
234 | | - |
235 | | - |
236 | QWindowSystemInterfacePrivate::ExposeEvent::ExposeEvent(QWindow *exposed, const QRegion ®ion) | - |
237 | : WindowSystemEvent(Expose) | - |
238 | , exposed(exposed) | - |
239 | , isExposed(exposed && exposed->handle() ? exposed->handle()->isExposed() : false) | - |
240 | , region(region) | - |
241 | { | - |
242 | } executed: } Execution Count:3619 | 3619 |
243 | | - |
244 | int QWindowSystemInterfacePrivate::windowSystemEventsQueued() | - |
245 | { | - |
246 | return windowSystemEventQueue.count(); executed: return windowSystemEventQueue.count(); Execution Count:654083 | 654083 |
247 | } | - |
248 | | - |
249 | QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent() | - |
250 | { | - |
251 | return windowSystemEventQueue.takeFirstOrReturnNull(); executed: return windowSystemEventQueue.takeFirstOrReturnNull(); Execution Count:11911 | 11911 |
252 | } | - |
253 | | - |
254 | QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() | - |
255 | { | - |
256 | return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull(); never executed: return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull(); | 0 |
257 | } | - |
258 | | - |
259 | QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::peekWindowSystemEvent(EventType t) | - |
260 | { | - |
261 | return windowSystemEventQueue.peekAtFirstOfType(t); executed: return windowSystemEventQueue.peekAtFirstOfType(t); Execution Count:702 | 702 |
262 | } | - |
263 | | - |
264 | void QWindowSystemInterfacePrivate::removeWindowSystemEvent(WindowSystemEvent *event) | - |
265 | { | - |
266 | windowSystemEventQueue.remove(event); | - |
267 | } executed: } Execution Count:184 | 184 |
268 | | - |
269 | void QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *ev) | - |
270 | { | - |
271 | if (synchronousWindowsSystemEvents) { partially evaluated: synchronousWindowsSystemEvents no Evaluation Count:0 | yes Evaluation Count:12082 |
| 0-12082 |
272 | QGuiApplicationPrivate::processWindowSystemEvent(ev); | - |
273 | } else { | 0 |
274 | windowSystemEventQueue.append(ev); | - |
275 | QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher(); | - |
276 | if (dispatcher) partially evaluated: dispatcher yes Evaluation Count:12082 | no Evaluation Count:0 |
| 0-12082 |
277 | dispatcher->wakeUp(); executed: dispatcher->wakeUp(); Execution Count:12082 | 12082 |
278 | } executed: } Execution Count:12082 | 12082 |
279 | } | - |
280 | | - |
281 | void QWindowSystemInterface::registerTouchDevice(QTouchDevice *device) | - |
282 | { | - |
283 | QTouchDevicePrivate::registerDevice(device); | - |
284 | } executed: } Execution Count:15 | 15 |
285 | | - |
286 | void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device, | - |
287 | const QList<TouchPoint> &points, Qt::KeyboardModifiers mods) | - |
288 | { | - |
289 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
290 | handleTouchEvent(w, time, device, points, mods); | - |
291 | } executed: } Execution Count:29 | 29 |
292 | | - |
293 | QList<QTouchEvent::TouchPoint> QWindowSystemInterfacePrivate::convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type) | - |
294 | { | - |
295 | QList<QTouchEvent::TouchPoint> touchPoints; | - |
296 | Qt::TouchPointStates states; | - |
297 | QTouchEvent::TouchPoint p; | - |
298 | | - |
299 | QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin(); | - |
300 | QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd(); | - |
301 | while (point != end) { evaluated: point != end yes Evaluation Count:62 | yes Evaluation Count:53 |
| 53-62 |
302 | p.setId(point->id); | - |
303 | p.setPressure(point->pressure); | - |
304 | states |= point->state; | - |
305 | p.setState(point->state); | - |
306 | | - |
307 | const QPointF screenPos = point->area.center(); | - |
308 | p.setScreenPos(screenPos); | - |
309 | p.setScreenRect(point->area); | - |
310 | | - |
311 | | - |
312 | | - |
313 | | - |
314 | p.setNormalizedPos(point->normalPosition); | - |
315 | p.setVelocity(point->velocity); | - |
316 | p.setFlags(point->flags); | - |
317 | p.setRawScreenPositions(point->rawPositions); | - |
318 | | - |
319 | touchPoints.append(p); | - |
320 | ++point; | - |
321 | } executed: } Execution Count:62 | 62 |
322 | | - |
323 | | - |
324 | if (type) { partially evaluated: type yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
325 | *type = QEvent::TouchUpdate; | - |
326 | if (states == Qt::TouchPointPressed) evaluated: states == Qt::TouchPointPressed yes Evaluation Count:26 | yes Evaluation Count:27 |
| 26-27 |
327 | *type = QEvent::TouchBegin; executed: *type = QEvent::TouchBegin; Execution Count:26 | 26 |
328 | else if (states == Qt::TouchPointReleased) evaluated: states == Qt::TouchPointReleased yes Evaluation Count:21 | yes Evaluation Count:6 |
| 6-21 |
329 | *type = QEvent::TouchEnd; executed: *type = QEvent::TouchEnd; Execution Count:21 | 21 |
330 | } | - |
331 | | - |
332 | return touchPoints; executed: return touchPoints; Execution Count:53 | 53 |
333 | } | - |
334 | | - |
335 | void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QTouchDevice *device, | - |
336 | const QList<TouchPoint> &points, Qt::KeyboardModifiers mods) | - |
337 | { | - |
338 | if (!points.size()) partially evaluated: !points.size() no Evaluation Count:0 | yes Evaluation Count:49 |
| 0-49 |
339 | return; | 0 |
340 | | - |
341 | if (!QTouchDevicePrivate::isRegistered(device)) partially evaluated: !QTouchDevicePrivate::isRegistered(device) no Evaluation Count:0 | yes Evaluation Count:49 |
| 0-49 |
342 | return; | 0 |
343 | | - |
344 | QEvent::Type type; | - |
345 | QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type); | - |
346 | | - |
347 | QWindowSystemInterfacePrivate::TouchEvent *e = | - |
348 | new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, device, touchPoints, mods); | - |
349 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
350 | } executed: } Execution Count:49 | 49 |
351 | | - |
352 | void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, QTouchDevice *device, | - |
353 | Qt::KeyboardModifiers mods) | - |
354 | { | - |
355 | unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
356 | handleTouchCancelEvent(w, time, device, mods); | - |
357 | } executed: } Execution Count:3 | 3 |
358 | | - |
359 | void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device, | - |
360 | Qt::KeyboardModifiers mods) | - |
361 | { | - |
362 | QWindowSystemInterfacePrivate::TouchEvent *e = | - |
363 | new QWindowSystemInterfacePrivate::TouchEvent(w, timestamp, QEvent::TouchCancel, device, | - |
364 | QList<QTouchEvent::TouchPoint>(), mods); | - |
365 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
366 | } executed: } Execution Count:3 | 3 |
367 | | - |
368 | void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation orientation) | - |
369 | { | - |
370 | QWindowSystemInterfacePrivate::ScreenOrientationEvent *e = | - |
371 | new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen, orientation); | - |
372 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
373 | } executed: } Execution Count:7 | 7 |
374 | | - |
375 | void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry) | - |
376 | { | - |
377 | QWindowSystemInterfacePrivate::ScreenGeometryEvent *e = | - |
378 | new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry); | - |
379 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
380 | } | 0 |
381 | | - |
382 | void QWindowSystemInterface::handleScreenAvailableGeometryChange(QScreen *screen, const QRect &availableGeometry) | - |
383 | { | - |
384 | QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e = | - |
385 | new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen, availableGeometry); | - |
386 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
387 | } | 0 |
388 | | - |
389 | void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal dpiX, qreal dpiY) | - |
390 | { | - |
391 | QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e = | - |
392 | new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen, dpiX, dpiY); | - |
393 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
394 | } | 0 |
395 | | - |
396 | void QWindowSystemInterface::handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate) | - |
397 | { | - |
398 | QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e = | - |
399 | new QWindowSystemInterfacePrivate::ScreenRefreshRateEvent(screen, newRefreshRate); | - |
400 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
401 | } | 0 |
402 | | - |
403 | void QWindowSystemInterface::handleThemeChange(QWindow *tlw) | - |
404 | { | - |
405 | QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw); | - |
406 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
407 | } | 0 |
408 | | - |
409 | void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion ®ion) | - |
410 | { | - |
411 | QWindowSystemInterfacePrivate::ExposeEvent *e = new QWindowSystemInterfacePrivate::ExposeEvent(tlw, region); | - |
412 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
413 | } executed: } Execution Count:3619 | 3619 |
414 | | - |
415 | void QWindowSystemInterface::flushWindowSystemEvents() | - |
416 | { | - |
417 | sendWindowSystemEventsImplementation(QEventLoop::AllEvents); | - |
418 | } executed: } Execution Count:295 | 295 |
419 | | - |
420 | bool QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags) | - |
421 | { | - |
422 | QCoreApplication::sendPostedEvents(); | - |
423 | return sendWindowSystemEventsImplementation(flags); executed: return sendWindowSystemEventsImplementation(flags); Execution Count:2754 | 2754 |
424 | } | - |
425 | | - |
426 | void QWindowSystemInterface::setSynchronousWindowsSystemEvents(bool enable) | - |
427 | { | - |
428 | QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = enable; | - |
429 | } | 0 |
430 | | - |
431 | bool QWindowSystemInterface::sendWindowSystemEventsImplementation(QEventLoop::ProcessEventsFlags flags) | - |
432 | { | - |
433 | int nevents = 0; | - |
434 | | - |
435 | while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()) { evaluated: QWindowSystemInterfacePrivate::windowSystemEventsQueued() yes Evaluation Count:11911 | yes Evaluation Count:3049 |
| 3049-11911 |
436 | QWindowSystemInterfacePrivate::WindowSystemEvent *event = | - |
437 | (flags & QEventLoop::ExcludeUserInputEvents) ? partially evaluated: (flags & QEventLoop::ExcludeUserInputEvents) no Evaluation Count:0 | yes Evaluation Count:11911 |
| 0-11911 |
438 | QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() : | - |
439 | QWindowSystemInterfacePrivate::getWindowSystemEvent(); | - |
440 | if (!event) partially evaluated: !event no Evaluation Count:0 | yes Evaluation Count:11911 |
| 0-11911 |
441 | break; | 0 |
442 | nevents++; | - |
443 | QGuiApplicationPrivate::processWindowSystemEvent(event); | - |
444 | delete event; | - |
445 | } executed: } Execution Count:11911 | 11911 |
446 | | - |
447 | return (nevents > 0); executed: return (nevents > 0); Execution Count:3049 | 3049 |
448 | } | - |
449 | | - |
450 | int QWindowSystemInterface::windowSystemEventsQueued() | - |
451 | { | - |
452 | return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); executed: return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); Execution Count:639123 | 639123 |
453 | } | - |
454 | | - |
455 | | - |
456 | QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) | - |
457 | { | - |
458 | return QGuiApplicationPrivate::processDrag(w, dropData, p,supportedActions); never executed: return QGuiApplicationPrivate::processDrag(w, dropData, p,supportedActions); | 0 |
459 | } | - |
460 | | - |
461 | QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) | - |
462 | { | - |
463 | return QGuiApplicationPrivate::processDrop(w, dropData, p,supportedActions); never executed: return QGuiApplicationPrivate::processDrop(w, dropData, p,supportedActions); | 0 |
464 | } | - |
465 | bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result) | - |
466 | { | - |
467 | return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result); executed: return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result); Execution Count:68884 | 68884 |
468 | } | - |
469 | | - |
470 | void QWindowSystemInterface::handleFileOpenEvent(const QString& fileName) | - |
471 | { | - |
472 | QWindowSystemInterfacePrivate::FileOpenEvent e(fileName); | - |
473 | QGuiApplicationPrivate::processWindowSystemEvent(&e); | - |
474 | } | 0 |
475 | | - |
476 | void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global, | - |
477 | int device, int pointerType, qreal pressure, int xTilt, int yTilt, | - |
478 | qreal tangentialPressure, qreal rotation, int z, qint64 uid, | - |
479 | Qt::KeyboardModifiers modifiers) | - |
480 | { | - |
481 | QWindowSystemInterfacePrivate::TabletEvent *e = | - |
482 | new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, down, local, global, device, pointerType, pressure, | - |
483 | xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); | - |
484 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
485 | } executed: } Execution Count:2 | 2 |
486 | | - |
487 | void QWindowSystemInterface::handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global, | - |
488 | int device, int pointerType, qreal pressure, int xTilt, int yTilt, | - |
489 | qreal tangentialPressure, qreal rotation, int z, qint64 uid, | - |
490 | Qt::KeyboardModifiers modifiers) | - |
491 | { | - |
492 | ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
493 | handleTabletEvent(w, time, down, local, global, device, pointerType, pressure, | - |
494 | xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); | - |
495 | } executed: } Execution Count:2 | 2 |
496 | | - |
497 | void QWindowSystemInterface::handleTabletEnterProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid) | - |
498 | { | - |
499 | QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e = | - |
500 | new QWindowSystemInterfacePrivate::TabletEnterProximityEvent(timestamp, device, pointerType, uid); | - |
501 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
502 | } executed: } Execution Count:1 | 1 |
503 | | - |
504 | void QWindowSystemInterface::handleTabletEnterProximityEvent(int device, int pointerType, qint64 uid) | - |
505 | { | - |
506 | ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
507 | handleTabletEnterProximityEvent(time, device, pointerType, uid); | - |
508 | } executed: } Execution Count:1 | 1 |
509 | | - |
510 | void QWindowSystemInterface::handleTabletLeaveProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid) | - |
511 | { | - |
512 | QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e = | - |
513 | new QWindowSystemInterfacePrivate::TabletLeaveProximityEvent(timestamp, device, pointerType, uid); | - |
514 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
515 | } executed: } Execution Count:1 | 1 |
516 | | - |
517 | void QWindowSystemInterface::handleTabletLeaveProximityEvent(int device, int pointerType, qint64 uid) | - |
518 | { | - |
519 | ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed(); | - |
520 | handleTabletLeaveProximityEvent(time, device, pointerType, uid); | - |
521 | } executed: } Execution Count:1 | 1 |
522 | | - |
523 | void QWindowSystemInterface::handlePlatformPanelEvent(QWindow *w) | - |
524 | { | - |
525 | QWindowSystemInterfacePrivate::PlatformPanelEvent *e = | - |
526 | new QWindowSystemInterfacePrivate::PlatformPanelEvent(w); | - |
527 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
528 | } | 0 |
529 | | - |
530 | | - |
531 | void QWindowSystemInterface::handleContextMenuEvent(QWindow *w, bool mouseTriggered, | - |
532 | const QPoint &pos, const QPoint &globalPos, | - |
533 | Qt::KeyboardModifiers modifiers) | - |
534 | { | - |
535 | QWindowSystemInterfacePrivate::ContextMenuEvent *e = | - |
536 | new QWindowSystemInterfacePrivate::ContextMenuEvent(w, mouseTriggered, pos, | - |
537 | globalPos, modifiers); | - |
538 | QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); | - |
539 | } | 0 |
540 | | - |
541 | | - |
542 | __attribute__((visibility("default"))) void qt_handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier) { | - |
543 | QWindowSystemInterface::handleMouseEvent(w, local, global, b, mods); | - |
544 | } executed: } Execution Count:94 | 94 |
545 | | - |
546 | __attribute__((visibility("default"))) void qt_handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1) | - |
547 | { | - |
548 | QWindowSystemInterface::handleKeyEvent(w, t, k, mods, text, autorep, count); | - |
549 | } executed: } Execution Count:70 | 70 |
550 | | - |
551 | static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt) | - |
552 | { | - |
553 | QWindowSystemInterface::TouchPoint p; | - |
554 | p.id = pt.id(); | - |
555 | p.flags = pt.flags(); | - |
556 | p.normalPosition = pt.normalizedPos(); | - |
557 | p.area = pt.screenRect(); | - |
558 | p.pressure = pt.pressure(); | - |
559 | p.state = pt.state(); | - |
560 | p.velocity = pt.velocity(); | - |
561 | p.rawPositions = pt.rawScreenPositions(); | - |
562 | return p; executed: return p; Execution Count:9 | 9 |
563 | } | - |
564 | static QList<struct QWindowSystemInterface::TouchPoint> touchPointList(const QList<QTouchEvent::TouchPoint>& pointList) | - |
565 | { | - |
566 | QList<struct QWindowSystemInterface::TouchPoint> newList; | - |
567 | | - |
568 | for (QForeachContainer<__typeof__(pointList)> _container_(pointList); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (QTouchEvent::TouchPoint p = *_container_.i;; __extension__ ({--_container_.brk; break;})) | - |
569 | { | - |
570 | newList.append(touchPoint(p)); | - |
571 | } executed: } Execution Count:9 | 9 |
572 | return newList; executed: return newList; Execution Count:9 | 9 |
573 | } | - |
574 | | - |
575 | __attribute__((visibility("default"))) void qt_handleTouchEvent(QWindow *w, QTouchDevice *device, | - |
576 | const QList<QTouchEvent::TouchPoint> &points, | - |
577 | Qt::KeyboardModifiers mods = Qt::NoModifier) | - |
578 | { | - |
579 | QWindowSystemInterface::handleTouchEvent(w, device, touchPointList(points), mods); | - |
580 | } executed: } Execution Count:9 | 9 |
581 | | - |
582 | | - |
583 | | - |
| | |