kernel/qwindowsysteminterface.cpp

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
1/**************************************************************************** -
2** -
3** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -
4** Contact: http://www.qt-project.org/legal -
5** -
6** This file is part of the QtGui module of the Qt Toolkit. -
7** -
8** $QT_BEGIN_LICENSE:LGPL$ -
9** Commercial License Usage -
10** Licensees holding valid commercial Qt licenses may use this file in -
11** accordance with the commercial license agreement provided with the -
12** Software or, alternatively, in accordance with the terms contained in -
13** a written agreement between you and Digia. For licensing terms and -
14** conditions see http://qt.digia.com/licensing. For further information -
15** use the contact form at http://qt.digia.com/contact-us. -
16** -
17** GNU Lesser General Public License Usage -
18** Alternatively, this file may be used under the terms of the GNU Lesser -
19** General Public License version 2.1 as published by the Free Software -
20** Foundation and appearing in the file LICENSE.LGPL included in the -
21** packaging of this file. Please review the following information to -
22** ensure the GNU Lesser General Public License version 2.1 requirements -
23** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -
24** -
25** In addition, as a special exception, Digia gives you certain additional -
26** rights. These rights are described in the Digia Qt LGPL Exception -
27** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -
28** -
29** GNU General Public License Usage -
30** Alternatively, this file may be used under the terms of the GNU -
31** General Public License version 3.0 as published by the Free Software -
32** Foundation and appearing in the file LICENSE.GPL included in the -
33** packaging of this file. Please review the following information to -
34** ensure the GNU General Public License version 3.0 requirements will be -
35** met: http://www.gnu.org/copyleft/gpl.html. -
36** -
37** -
38** $QT_END_LICENSE$ -
39** -
40****************************************************************************/ -
41#include "qwindowsysteminterface.h" -
42#include <qpa/qplatformwindow.h> -
43#include "qwindowsysteminterface_p.h" -
44#include "private/qguiapplication_p.h" -
45#include "private/qevent_p.h" -
46#include "private/qtouchdevice_p.h" -
47#include <QAbstractEventDispatcher> -
48#include <qpa/qplatformdrag.h> -
49#include <qdebug.h> -
50 -
51QT_BEGIN_NAMESPACE -
52 -
53 -
54QElapsedTimer QWindowSystemInterfacePrivate::eventTime; -
55bool QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = false; -
56 -
57//------------------------------------------------------------ -
58// -
59// Callback functions for plugins: -
60// -
61 -
62QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue; -
63 -
64extern QPointer<QWindow> qt_last_mouse_receiver; -
65 -
66/*! -
67 \class QWindowSystemInterface -
68 \since 5.0 -
69 \internal -
70 \preliminary -
71 \ingroup qpa -
72 \brief The QWindowSystemInterface provides an event queue for the QPA platform. -
73 -
74 The platform plugins call the various functions to notify about events. The events are queued -
75 until sendWindowSystemEvents() is called by the event dispatcher. -
76*/ -
77 -
78void QWindowSystemInterface::handleEnterEvent(QWindow *tlw, const QPointF &local, const QPointF &global) -
79{ -
80 if (tlw) {
partially evaluated: tlw
TRUEFALSE
yes
Evaluation Count:1670
no
Evaluation Count:0
0-1670
81 QWindowSystemInterfacePrivate::EnterEvent *e = new QWindowSystemInterfacePrivate::EnterEvent(tlw, local, global);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::EnterEvent *e = new QWindowSystemInterfacePrivate::EnterEvent(tlw, local, global);
-
82 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
83 }
executed: }
Execution Count:1670
1670
84}
executed: }
Execution Count:1670
1670
85 -
86void QWindowSystemInterface::handleLeaveEvent(QWindow *tlw) -
87{ -
88 QWindowSystemInterfacePrivate::LeaveEvent *e = new QWindowSystemInterfacePrivate::LeaveEvent(tlw);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::LeaveEvent *e = new QWindowSystemInterfacePrivate::LeaveEvent(tlw);
-
89 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
90}
executed: }
Execution Count:760
760
91 -
92/*! -
93 This method can be used to ensure leave and enter events are both in queue when moving from -
94 one QWindow to another. This allows QWindow subclasses to check for a queued enter event -
95 when handling the leave event (\c QWindowSystemInterfacePrivate::peekWindowSystemEvent) to -
96 determine where mouse went and act accordingly. E.g. QWidgetWindow needs to know if mouse -
97 cursor moves between windows in same window hierarchy. -
98*/ -
99void QWindowSystemInterface::handleEnterLeaveEvent(QWindow *enter, QWindow *leave, const QPointF &local, const QPointF& global) -
100{ -
101 bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents;
executed (the execution status of this line is deduced): bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents;
-
102 if (wasSynchronous)
partially evaluated: wasSynchronous
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:502
0-502
103 setSynchronousWindowsSystemEvents(false);
never executed: setSynchronousWindowsSystemEvents(false);
0
104 handleLeaveEvent(leave);
executed (the execution status of this line is deduced): handleLeaveEvent(leave);
-
105 handleEnterEvent(enter, local, global);
executed (the execution status of this line is deduced): handleEnterEvent(enter, local, global);
-
106 if (wasSynchronous) {
partially evaluated: wasSynchronous
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:502
0-502
107 flushWindowSystemEvents();
never executed (the execution status of this line is deduced): flushWindowSystemEvents();
-
108 setSynchronousWindowsSystemEvents(true);
never executed (the execution status of this line is deduced): setSynchronousWindowsSystemEvents(true);
-
109 }
never executed: }
0
110}
executed: }
Execution Count:502
502
111 -
112void QWindowSystemInterface::handleWindowActivated(QWindow *tlw) -
113{ -
114 QWindowSystemInterfacePrivate::ActivatedWindowEvent *e = new QWindowSystemInterfacePrivate::ActivatedWindowEvent(tlw);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ActivatedWindowEvent *e = new QWindowSystemInterfacePrivate::ActivatedWindowEvent(tlw);
-
115 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
116}
executed: }
Execution Count:1927
1927
117 -
118void QWindowSystemInterface::handleWindowStateChanged(QWindow *tlw, Qt::WindowState newState) -
119{ -
120 QWindowSystemInterfacePrivate::WindowStateChangedEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::WindowStateChangedEvent *e =
-
121 new QWindowSystemInterfacePrivate::WindowStateChangedEvent(tlw, newState);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::WindowStateChangedEvent(tlw, newState);
-
122 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
123}
executed: }
Execution Count:1496
1496
124 -
125void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &newRect) -
126{ -
127 QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect);
-
128 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
129}
executed: }
Execution Count:1927
1927
130 -
131void QWindowSystemInterface::handleCloseEvent(QWindow *tlw) -
132{ -
133 if (tlw) {
never evaluated: tlw
0
134 QWindowSystemInterfacePrivate::CloseEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::CloseEvent *e =
-
135 new QWindowSystemInterfacePrivate::CloseEvent(tlw);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::CloseEvent(tlw);
-
136 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
137 }
never executed: }
0
138}
never executed: }
0
139 -
140/*! -
141 -
142\a w == 0 means that the event is in global coords only, \a local will be ignored in this case -
143 -
144*/ -
145void QWindowSystemInterface::handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) -
146{ -
147 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
148 handleMouseEvent(w, time, local, global, b, mods);
executed (the execution status of this line is deduced): handleMouseEvent(w, time, local, global, b, mods);
-
149}
executed: }
Execution Count:121
121
150 -
151void QWindowSystemInterface::handleMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) -
152{ -
153 QWindowSystemInterfacePrivate::MouseEvent * e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::MouseEvent * e =
-
154 new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp, local, global, b, mods);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp, local, global, b, mods);
-
155 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
156}
executed: }
Execution Count:545
545
157 -
158void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) -
159{ -
160 const unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
never executed (the execution status of this line is deduced): const unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
161 handleFrameStrutMouseEvent(w, time, local, global, b, mods);
never executed (the execution status of this line is deduced): handleFrameStrutMouseEvent(w, time, local, global, b, mods);
-
162}
never executed: }
0
163 -
164void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods) -
165{ -
166 QWindowSystemInterfacePrivate::MouseEvent * e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::MouseEvent * e =
-
167 new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp,
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp,
-
168 QWindowSystemInterfacePrivate::FrameStrutMouse,
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::FrameStrutMouse,
-
169 local, global, b, mods);
never executed (the execution status of this line is deduced): local, global, b, mods);
-
170 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
171}
never executed: }
0
172 -
173bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, -
174 const QString & text, bool autorep, ushort count) -
175{ -
176 unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
177 return tryHandleShortcutEvent(w, timestamp, k, mods, text, autorep, count);
executed: return tryHandleShortcutEvent(w, timestamp, k, mods, text, autorep, count);
Execution Count:3
3
178} -
179 -
180bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, -
181 const QString & text, bool autorep, ushort count) -
182{ -
183#ifndef QT_NO_SHORTCUT -
184 QGuiApplicationPrivate::modifier_buttons = mods;
executed (the execution status of this line is deduced): QGuiApplicationPrivate::modifier_buttons = mods;
-
185 -
186 QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count);
executed (the execution status of this line is deduced): QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count);
-
187 qevent.setTimestamp(timestamp);
executed (the execution status of this line is deduced): qevent.setTimestamp(timestamp);
-
188 return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
executed: return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
Execution Count:3
3
189#else -
190 Q_UNUSED(w) -
191 Q_UNUSED(timestamp) -
192 Q_UNUSED(k) -
193 Q_UNUSED(mods) -
194 Q_UNUSED(text) -
195 Q_UNUSED(autorep) -
196 Q_UNUSED(count) -
197 return false; -
198#endif -
199} -
200 -
201bool QWindowSystemInterface::tryHandleExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, -
202 quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, -
203 const QString &text, bool autorep, ushort count) -
204{ -
205 unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
never executed (the execution status of this line is deduced): unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
206 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
207} -
208 -
209bool QWindowSystemInterface::tryHandleExtendedShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, -
210 quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, -
211 const QString &text, bool autorep, ushort count) -
212{ -
213#ifndef QT_NO_SHORTCUT -
214 QGuiApplicationPrivate::modifier_buttons = mods;
never executed (the execution status of this line is deduced): QGuiApplicationPrivate::modifier_buttons = mods;
-
215 -
216 QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
never executed (the execution status of this line is deduced): QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
-
217 qevent.setTimestamp(timestamp);
never executed (the execution status of this line is deduced): qevent.setTimestamp(timestamp);
-
218 return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
never executed: return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
0
219#else -
220 Q_UNUSED(w) -
221 Q_UNUSED(timestamp) -
222 Q_UNUSED(k) -
223 Q_UNUSED(mods) -
224 Q_UNUSED(nativeScanCode) -
225 Q_UNUSED(nativeVirtualKey) -
226 Q_UNUSED(nativeModifiers) -
227 Q_UNUSED(text) -
228 Q_UNUSED(autorep) -
229 Q_UNUSED(count) -
230 return false; -
231#endif -
232} -
233 -
234 -
235void QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) { -
236 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
237 handleKeyEvent(w, time, t, k, mods, text, autorep, count);
executed (the execution status of this line is deduced): handleKeyEvent(w, time, t, k, mods, text, autorep, count);
-
238}
executed: }
Execution Count:72
72
239 -
240void QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) -
241{ -
242 QWindowSystemInterfacePrivate::KeyEvent * e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::KeyEvent * e =
-
243 new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);
-
244 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
245}
executed: }
Execution Count:72
72
246 -
247void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *w, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, -
248 quint32 nativeScanCode, quint32 nativeVirtualKey, -
249 quint32 nativeModifiers, -
250 const QString& text, bool autorep, -
251 ushort count) -
252{ -
253 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
never executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
254 handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers,
never executed (the execution status of this line is deduced): handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers,
-
255 text, autorep, count);
never executed (the execution status of this line is deduced): text, autorep, count);
-
256}
never executed: }
0
257 -
258void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type type, int key, -
259 Qt::KeyboardModifiers modifiers, -
260 quint32 nativeScanCode, quint32 nativeVirtualKey, -
261 quint32 nativeModifiers, -
262 const QString& text, bool autorep, -
263 ushort count) -
264{ -
265 QWindowSystemInterfacePrivate::KeyEvent * e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::KeyEvent * e =
-
266 new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers,
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers,
-
267 nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
never executed (the execution status of this line is deduced): nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
-
268 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
269}
never executed: }
0
270 -
271void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods) { -
272 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
never executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
273 handleWheelEvent(w, time, local, global, d, o, mods);
never executed (the execution status of this line is deduced): handleWheelEvent(w, time, local, global, d, o, mods);
-
274}
never executed: }
0
275 -
276void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods) -
277{ -
278 QPoint point = (o == Qt::Vertical) ? QPoint(0, d) : QPoint(d, 0);
never evaluated: (o == Qt::Vertical)
0
279 handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods);
never executed (the execution status of this line is deduced): handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods);
-
280}
never executed: }
0
281 -
282void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods) -
283{ -
284 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
285 handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods);
executed (the execution status of this line is deduced): handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods);
-
286}
executed: }
Execution Count:3
3
287 -
288void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods) -
289{ -
290 // Qt 4 sends two separate wheel events for horizontal and vertical -
291 // deltas. For Qt 5 we want to send the deltas in one event, but at the -
292 // same time preserve source and behavior compatibility with Qt 4. -
293 // -
294 // In addition high-resolution pixel-based deltas are also supported. -
295 // Platforms that does not support these may pass a null point here. -
296 // Angle deltas must always be sent in addition to pixel deltas. -
297 QWindowSystemInterfacePrivate::WheelEvent *e;
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::WheelEvent *e;
-
298 -
299 if (angleDelta.isNull())
partially evaluated: angleDelta.isNull()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3
0-3
300 return;
never executed: return;
0
301 -
302 // Simple case: vertical deltas only: -
303 if (angleDelta.y() != 0 && angleDelta.x() == 0) {
partially evaluated: angleDelta.y() != 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
partially evaluated: angleDelta.x() == 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
304 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods);
executed (the execution status of this line is deduced): e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods);
-
305 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
306 return;
executed: return;
Execution Count:3
3
307 } -
308 -
309 // Simple case: horizontal deltas only: -
310 if (angleDelta.y() == 0 && angleDelta.x() != 0) {
never evaluated: angleDelta.y() == 0
never evaluated: angleDelta.x() != 0
0
311 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods);
never executed (the execution status of this line is deduced): e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods);
-
312 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
313 return;
never executed: return;
0
314 } -
315 -
316 // Both horizontal and vertical deltas: Send two wheel events. -
317 // The first event contains the Qt 5 pixel and angle delta as points, -
318 // and in addition the Qt 4 compatibility vertical angle delta. -
319 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods);
never executed (the execution status of this line is deduced): e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods);
-
320 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
321 -
322 // The second event contains null pixel and angle points and the -
323 // Qt 4 compatibility horizontal angle delta. -
324 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods);
never executed (the execution status of this line is deduced): e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods);
-
325 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
326}
never executed: }
0
327 -
328 -
329QWindowSystemInterfacePrivate::ExposeEvent::ExposeEvent(QWindow *exposed, const QRegion &region) -
330 : WindowSystemEvent(Expose) -
331 , exposed(exposed) -
332 , isExposed(exposed && exposed->handle() ? exposed->handle()->isExposed() : false) -
333 , region(region) -
334{ -
335}
executed: }
Execution Count:3619
3619
336 -
337int QWindowSystemInterfacePrivate::windowSystemEventsQueued() -
338{ -
339 return windowSystemEventQueue.count();
executed: return windowSystemEventQueue.count();
Execution Count:654083
654083
340} -
341 -
342QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent() -
343{ -
344 return windowSystemEventQueue.takeFirstOrReturnNull();
executed: return windowSystemEventQueue.takeFirstOrReturnNull();
Execution Count:11911
11911
345} -
346 -
347QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() -
348{ -
349 return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
never executed: return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
0
350} -
351 -
352QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::peekWindowSystemEvent(EventType t) -
353{ -
354 return windowSystemEventQueue.peekAtFirstOfType(t);
executed: return windowSystemEventQueue.peekAtFirstOfType(t);
Execution Count:702
702
355} -
356 -
357void QWindowSystemInterfacePrivate::removeWindowSystemEvent(WindowSystemEvent *event) -
358{ -
359 windowSystemEventQueue.remove(event);
executed (the execution status of this line is deduced): windowSystemEventQueue.remove(event);
-
360}
executed: }
Execution Count:184
184
361 -
362void QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *ev) -
363{ -
364 if (synchronousWindowsSystemEvents) {
partially evaluated: synchronousWindowsSystemEvents
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12082
0-12082
365 QGuiApplicationPrivate::processWindowSystemEvent(ev);
never executed (the execution status of this line is deduced): QGuiApplicationPrivate::processWindowSystemEvent(ev);
-
366 } else {
never executed: }
0
367 windowSystemEventQueue.append(ev);
executed (the execution status of this line is deduced): windowSystemEventQueue.append(ev);
-
368 QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher();
executed (the execution status of this line is deduced): QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher();
-
369 if (dispatcher)
partially evaluated: dispatcher
TRUEFALSE
yes
Evaluation Count:12082
no
Evaluation Count:0
0-12082
370 dispatcher->wakeUp();
executed: dispatcher->wakeUp();
Execution Count:12082
12082
371 }
executed: }
Execution Count:12082
12082
372} -
373 -
374void QWindowSystemInterface::registerTouchDevice(QTouchDevice *device) -
375{ -
376 QTouchDevicePrivate::registerDevice(device);
executed (the execution status of this line is deduced): QTouchDevicePrivate::registerDevice(device);
-
377}
executed: }
Execution Count:15
15
378 -
379void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device, -
380 const QList<TouchPoint> &points, Qt::KeyboardModifiers mods) -
381{ -
382 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
383 handleTouchEvent(w, time, device, points, mods);
executed (the execution status of this line is deduced): handleTouchEvent(w, time, device, points, mods);
-
384}
executed: }
Execution Count:29
29
385 -
386QList<QTouchEvent::TouchPoint> QWindowSystemInterfacePrivate::convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type) -
387{ -
388 QList<QTouchEvent::TouchPoint> touchPoints;
executed (the execution status of this line is deduced): QList<QTouchEvent::TouchPoint> touchPoints;
-
389 Qt::TouchPointStates states;
executed (the execution status of this line is deduced): Qt::TouchPointStates states;
-
390 QTouchEvent::TouchPoint p;
executed (the execution status of this line is deduced): QTouchEvent::TouchPoint p;
-
391 -
392 QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin();
executed (the execution status of this line is deduced): QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin();
-
393 QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd();
executed (the execution status of this line is deduced): QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd();
-
394 while (point != end) {
evaluated: point != end
TRUEFALSE
yes
Evaluation Count:62
yes
Evaluation Count:53
53-62
395 p.setId(point->id);
executed (the execution status of this line is deduced): p.setId(point->id);
-
396 p.setPressure(point->pressure);
executed (the execution status of this line is deduced): p.setPressure(point->pressure);
-
397 states |= point->state;
executed (the execution status of this line is deduced): states |= point->state;
-
398 p.setState(point->state);
executed (the execution status of this line is deduced): p.setState(point->state);
-
399 -
400 const QPointF screenPos = point->area.center();
executed (the execution status of this line is deduced): const QPointF screenPos = point->area.center();
-
401 p.setScreenPos(screenPos);
executed (the execution status of this line is deduced): p.setScreenPos(screenPos);
-
402 p.setScreenRect(point->area);
executed (the execution status of this line is deduced): p.setScreenRect(point->area);
-
403 -
404 // The local pos and rect are not set, they will be calculated -
405 // when the event gets processed by QGuiApplication. -
406 -
407 p.setNormalizedPos(point->normalPosition);
executed (the execution status of this line is deduced): p.setNormalizedPos(point->normalPosition);
-
408 p.setVelocity(point->velocity);
executed (the execution status of this line is deduced): p.setVelocity(point->velocity);
-
409 p.setFlags(point->flags);
executed (the execution status of this line is deduced): p.setFlags(point->flags);
-
410 p.setRawScreenPositions(point->rawPositions);
executed (the execution status of this line is deduced): p.setRawScreenPositions(point->rawPositions);
-
411 -
412 touchPoints.append(p);
executed (the execution status of this line is deduced): touchPoints.append(p);
-
413 ++point;
executed (the execution status of this line is deduced): ++point;
-
414 }
executed: }
Execution Count:62
62
415 -
416 // Determine the event type based on the combined point states. -
417 if (type) {
partially evaluated: type
TRUEFALSE
yes
Evaluation Count:53
no
Evaluation Count:0
0-53
418 *type = QEvent::TouchUpdate;
executed (the execution status of this line is deduced): *type = QEvent::TouchUpdate;
-
419 if (states == Qt::TouchPointPressed)
evaluated: states == Qt::TouchPointPressed
TRUEFALSE
yes
Evaluation Count:26
yes
Evaluation Count:27
26-27
420 *type = QEvent::TouchBegin;
executed: *type = QEvent::TouchBegin;
Execution Count:26
26
421 else if (states == Qt::TouchPointReleased)
evaluated: states == Qt::TouchPointReleased
TRUEFALSE
yes
Evaluation Count:21
yes
Evaluation Count:6
6-21
422 *type = QEvent::TouchEnd;
executed: *type = QEvent::TouchEnd;
Execution Count:21
21
423 } -
424 -
425 return touchPoints;
executed: return touchPoints;
Execution Count:53
53
426} -
427 -
428void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QTouchDevice *device, -
429 const QList<TouchPoint> &points, Qt::KeyboardModifiers mods) -
430{ -
431 if (!points.size()) // Touch events must have at least one point
partially evaluated: !points.size()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:49
0-49
432 return;
never executed: return;
0
433 -
434 if (!QTouchDevicePrivate::isRegistered(device)) // Disallow passing bogus, non-registered devices.
partially evaluated: !QTouchDevicePrivate::isRegistered(device)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:49
0-49
435 return;
never executed: return;
0
436 -
437 QEvent::Type type;
executed (the execution status of this line is deduced): QEvent::Type type;
-
438 QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type);
executed (the execution status of this line is deduced): QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type);
-
439 -
440 QWindowSystemInterfacePrivate::TouchEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::TouchEvent *e =
-
441 new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, device, touchPoints, mods);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, device, touchPoints, mods);
-
442 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
443}
executed: }
Execution Count:49
49
444 -
445void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, QTouchDevice *device, -
446 Qt::KeyboardModifiers mods) -
447{ -
448 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
449 handleTouchCancelEvent(w, time, device, mods);
executed (the execution status of this line is deduced): handleTouchCancelEvent(w, time, device, mods);
-
450}
executed: }
Execution Count:3
3
451 -
452void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device, -
453 Qt::KeyboardModifiers mods) -
454{ -
455 QWindowSystemInterfacePrivate::TouchEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::TouchEvent *e =
-
456 new QWindowSystemInterfacePrivate::TouchEvent(w, timestamp, QEvent::TouchCancel, device,
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::TouchEvent(w, timestamp, QEvent::TouchCancel, device,
-
457 QList<QTouchEvent::TouchPoint>(), mods);
executed (the execution status of this line is deduced): QList<QTouchEvent::TouchPoint>(), mods);
-
458 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
459}
executed: }
Execution Count:3
3
460 -
461void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation orientation) -
462{ -
463 QWindowSystemInterfacePrivate::ScreenOrientationEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ScreenOrientationEvent *e =
-
464 new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen, orientation);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen, orientation);
-
465 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
466}
executed: }
Execution Count:7
7
467 -
468void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry) -
469{ -
470 QWindowSystemInterfacePrivate::ScreenGeometryEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ScreenGeometryEvent *e =
-
471 new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry);
-
472 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
473}
never executed: }
0
474 -
475void QWindowSystemInterface::handleScreenAvailableGeometryChange(QScreen *screen, const QRect &availableGeometry) -
476{ -
477 QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e =
-
478 new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen, availableGeometry);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen, availableGeometry);
-
479 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
480}
never executed: }
0
481 -
482void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal dpiX, qreal dpiY) -
483{ -
484 QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e =
-
485 new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen, dpiX, dpiY);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen, dpiX, dpiY);
-
486 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
487}
never executed: }
0
488 -
489void QWindowSystemInterface::handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate) -
490{ -
491 QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e =
-
492 new QWindowSystemInterfacePrivate::ScreenRefreshRateEvent(screen, newRefreshRate);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ScreenRefreshRateEvent(screen, newRefreshRate);
-
493 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
494}
never executed: }
0
495 -
496void QWindowSystemInterface::handleThemeChange(QWindow *tlw) -
497{ -
498 QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw);
-
499 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
500}
never executed: }
0
501 -
502void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion &region) -
503{ -
504 QWindowSystemInterfacePrivate::ExposeEvent *e = new QWindowSystemInterfacePrivate::ExposeEvent(tlw, region);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ExposeEvent *e = new QWindowSystemInterfacePrivate::ExposeEvent(tlw, region);
-
505 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
506}
executed: }
Execution Count:3619
3619
507 -
508void QWindowSystemInterface::flushWindowSystemEvents() -
509{ -
510 sendWindowSystemEventsImplementation(QEventLoop::AllEvents);
executed (the execution status of this line is deduced): sendWindowSystemEventsImplementation(QEventLoop::AllEvents);
-
511}
executed: }
Execution Count:295
295
512 -
513bool QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags) -
514{ -
515 QCoreApplication::sendPostedEvents(); // handle gui and posted events
executed (the execution status of this line is deduced): QCoreApplication::sendPostedEvents();
-
516 return sendWindowSystemEventsImplementation(flags);
executed: return sendWindowSystemEventsImplementation(flags);
Execution Count:2754
2754
517} -
518 -
519void QWindowSystemInterface::setSynchronousWindowsSystemEvents(bool enable) -
520{ -
521 QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = enable;
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = enable;
-
522}
never executed: }
0
523 -
524bool QWindowSystemInterface::sendWindowSystemEventsImplementation(QEventLoop::ProcessEventsFlags flags) -
525{ -
526 int nevents = 0;
executed (the execution status of this line is deduced): int nevents = 0;
-
527 -
528 while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()) {
evaluated: QWindowSystemInterfacePrivate::windowSystemEventsQueued()
TRUEFALSE
yes
Evaluation Count:11911
yes
Evaluation Count:3049
3049-11911
529 QWindowSystemInterfacePrivate::WindowSystemEvent *event =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::WindowSystemEvent *event =
-
530 (flags & QEventLoop::ExcludeUserInputEvents) ?
partially evaluated: (flags & QEventLoop::ExcludeUserInputEvents)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11911
0-11911
531 QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() :
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() :
-
532 QWindowSystemInterfacePrivate::getWindowSystemEvent();
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::getWindowSystemEvent();
-
533 if (!event)
partially evaluated: !event
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11911
0-11911
534 break;
never executed: break;
0
535 nevents++;
executed (the execution status of this line is deduced): nevents++;
-
536 QGuiApplicationPrivate::processWindowSystemEvent(event);
executed (the execution status of this line is deduced): QGuiApplicationPrivate::processWindowSystemEvent(event);
-
537 delete event;
executed (the execution status of this line is deduced): delete event;
-
538 }
executed: }
Execution Count:11911
11911
539 -
540 return (nevents > 0);
executed: return (nevents > 0);
Execution Count:3049
3049
541} -
542 -
543int QWindowSystemInterface::windowSystemEventsQueued() -
544{ -
545 return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
executed: return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
Execution Count:639123
639123
546} -
547 -
548#ifndef QT_NO_DRAGANDDROP -
549QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) -
550{ -
551 return QGuiApplicationPrivate::processDrag(w, dropData, p,supportedActions);
never executed: return QGuiApplicationPrivate::processDrag(w, dropData, p,supportedActions);
0
552} -
553 -
554QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) -
555{ -
556 return QGuiApplicationPrivate::processDrop(w, dropData, p,supportedActions);
never executed: return QGuiApplicationPrivate::processDrop(w, dropData, p,supportedActions);
0
557} -
558#endif // QT_NO_DRAGANDDROP -
559 -
560/*! -
561 \fn static QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result) -
562 \brief Passes a native event identified by \a eventType to the \a window. -
563 -
564 \note This function can only be called from the GUI thread. -
565*/ -
566 -
567bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result) -
568{ -
569 return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
executed: return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
Execution Count:68884
68884
570} -
571 -
572void QWindowSystemInterface::handleFileOpenEvent(const QString& fileName) -
573{ -
574 QWindowSystemInterfacePrivate::FileOpenEvent e(fileName);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::FileOpenEvent e(fileName);
-
575 QGuiApplicationPrivate::processWindowSystemEvent(&e);
never executed (the execution status of this line is deduced): QGuiApplicationPrivate::processWindowSystemEvent(&e);
-
576}
never executed: }
0
577 -
578void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global, -
579 int device, int pointerType, qreal pressure, int xTilt, int yTilt, -
580 qreal tangentialPressure, qreal rotation, int z, qint64 uid, -
581 Qt::KeyboardModifiers modifiers) -
582{ -
583 QWindowSystemInterfacePrivate::TabletEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::TabletEvent *e =
-
584 new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, down, local, global, device, pointerType, pressure,
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, down, local, global, device, pointerType, pressure,
-
585 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
executed (the execution status of this line is deduced): xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
-
586 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
587}
executed: }
Execution Count:2
2
588 -
589void QWindowSystemInterface::handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global, -
590 int device, int pointerType, qreal pressure, int xTilt, int yTilt, -
591 qreal tangentialPressure, qreal rotation, int z, qint64 uid, -
592 Qt::KeyboardModifiers modifiers) -
593{ -
594 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
595 handleTabletEvent(w, time, down, local, global, device, pointerType, pressure,
executed (the execution status of this line is deduced): handleTabletEvent(w, time, down, local, global, device, pointerType, pressure,
-
596 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
executed (the execution status of this line is deduced): xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
-
597}
executed: }
Execution Count:2
2
598 -
599void QWindowSystemInterface::handleTabletEnterProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid) -
600{ -
601 QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e =
-
602 new QWindowSystemInterfacePrivate::TabletEnterProximityEvent(timestamp, device, pointerType, uid);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::TabletEnterProximityEvent(timestamp, device, pointerType, uid);
-
603 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
604}
executed: }
Execution Count:1
1
605 -
606void QWindowSystemInterface::handleTabletEnterProximityEvent(int device, int pointerType, qint64 uid) -
607{ -
608 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
609 handleTabletEnterProximityEvent(time, device, pointerType, uid);
executed (the execution status of this line is deduced): handleTabletEnterProximityEvent(time, device, pointerType, uid);
-
610}
executed: }
Execution Count:1
1
611 -
612void QWindowSystemInterface::handleTabletLeaveProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid) -
613{ -
614 QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e =
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e =
-
615 new QWindowSystemInterfacePrivate::TabletLeaveProximityEvent(timestamp, device, pointerType, uid);
executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::TabletLeaveProximityEvent(timestamp, device, pointerType, uid);
-
616 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
617}
executed: }
Execution Count:1
1
618 -
619void QWindowSystemInterface::handleTabletLeaveProximityEvent(int device, int pointerType, qint64 uid) -
620{ -
621 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
executed (the execution status of this line is deduced): ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
-
622 handleTabletLeaveProximityEvent(time, device, pointerType, uid);
executed (the execution status of this line is deduced): handleTabletLeaveProximityEvent(time, device, pointerType, uid);
-
623}
executed: }
Execution Count:1
1
624 -
625void QWindowSystemInterface::handlePlatformPanelEvent(QWindow *w) -
626{ -
627 QWindowSystemInterfacePrivate::PlatformPanelEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::PlatformPanelEvent *e =
-
628 new QWindowSystemInterfacePrivate::PlatformPanelEvent(w);
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::PlatformPanelEvent(w);
-
629 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
630}
never executed: }
0
631 -
632#ifndef QT_NO_CONTEXTMENU -
633void QWindowSystemInterface::handleContextMenuEvent(QWindow *w, bool mouseTriggered, -
634 const QPoint &pos, const QPoint &globalPos, -
635 Qt::KeyboardModifiers modifiers) -
636{ -
637 QWindowSystemInterfacePrivate::ContextMenuEvent *e =
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::ContextMenuEvent *e =
-
638 new QWindowSystemInterfacePrivate::ContextMenuEvent(w, mouseTriggered, pos,
never executed (the execution status of this line is deduced): new QWindowSystemInterfacePrivate::ContextMenuEvent(w, mouseTriggered, pos,
-
639 globalPos, modifiers);
never executed (the execution status of this line is deduced): globalPos, modifiers);
-
640 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
-
641}
never executed: }
0
642#endif -
643 -
644Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier) { -
645 QWindowSystemInterface::handleMouseEvent(w, local, global, b, mods);
executed (the execution status of this line is deduced): QWindowSystemInterface::handleMouseEvent(w, local, global, b, mods);
-
646}
executed: }
Execution Count:94
94
647 -
648Q_GUI_EXPORT void qt_handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1) -
649{ -
650 QWindowSystemInterface::handleKeyEvent(w, t, k, mods, text, autorep, count);
executed (the execution status of this line is deduced): QWindowSystemInterface::handleKeyEvent(w, t, k, mods, text, autorep, count);
-
651}
executed: }
Execution Count:70
70
652 -
653static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt) -
654{ -
655 QWindowSystemInterface::TouchPoint p;
executed (the execution status of this line is deduced): QWindowSystemInterface::TouchPoint p;
-
656 p.id = pt.id();
executed (the execution status of this line is deduced): p.id = pt.id();
-
657 p.flags = pt.flags();
executed (the execution status of this line is deduced): p.flags = pt.flags();
-
658 p.normalPosition = pt.normalizedPos();
executed (the execution status of this line is deduced): p.normalPosition = pt.normalizedPos();
-
659 p.area = pt.screenRect();
executed (the execution status of this line is deduced): p.area = pt.screenRect();
-
660 p.pressure = pt.pressure();
executed (the execution status of this line is deduced): p.pressure = pt.pressure();
-
661 p.state = pt.state();
executed (the execution status of this line is deduced): p.state = pt.state();
-
662 p.velocity = pt.velocity();
executed (the execution status of this line is deduced): p.velocity = pt.velocity();
-
663 p.rawPositions = pt.rawScreenPositions();
executed (the execution status of this line is deduced): p.rawPositions = pt.rawScreenPositions();
-
664 return p;
executed: return p;
Execution Count:9
9
665} -
666static QList<struct QWindowSystemInterface::TouchPoint> touchPointList(const QList<QTouchEvent::TouchPoint>& pointList) -
667{ -
668 QList<struct QWindowSystemInterface::TouchPoint> newList;
executed (the execution status of this line is deduced): QList<struct QWindowSystemInterface::TouchPoint> newList;
-
669 -
670 Q_FOREACH (QTouchEvent::TouchPoint p, pointList)
executed (the execution status of this line is deduced): 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;}))
-
671 { -
672 newList.append(touchPoint(p));
executed (the execution status of this line is deduced): newList.append(touchPoint(p));
-
673 }
executed: }
Execution Count:9
9
674 return newList;
executed: return newList;
Execution Count:9
9
675} -
676 -
677Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device, -
678 const QList<QTouchEvent::TouchPoint> &points, -
679 Qt::KeyboardModifiers mods = Qt::NoModifier) -
680{ -
681 QWindowSystemInterface::handleTouchEvent(w, device, touchPointList(points), mods);
executed (the execution status of this line is deduced): QWindowSystemInterface::handleTouchEvent(w, device, touchPointList(points), mods);
-
682}
executed: }
Execution Count:9
9
683 -
684QT_END_NAMESPACE -
685 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial