Line | Source Code | Coverage |
---|
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 | | - |
51 | QT_BEGIN_NAMESPACE | - |
52 | | - |
53 | | - |
54 | QElapsedTimer QWindowSystemInterfacePrivate::eventTime; | - |
55 | bool QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = false; | - |
56 | | - |
57 | //------------------------------------------------------------ | - |
58 | // | - |
59 | // Callback functions for plugins: | - |
60 | // | - |
61 | | - |
62 | QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue; | - |
63 | | - |
64 | extern 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 | | - |
78 | void QWindowSystemInterface::handleEnterEvent(QWindow *tlw, const QPointF &local, const QPointF &global) | - |
79 | { | - |
80 | if (tlw) { partially evaluated: tlw 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 | | - |
86 | void 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 | */ | - |
99 | void 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 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 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 | } | 0 |
110 | } executed: } Execution Count:502 | 502 |
111 | | - |
112 | void 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 | | - |
118 | void 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 | | - |
125 | void 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 | | - |
131 | void QWindowSystemInterface::handleCloseEvent(QWindow *tlw) | - |
132 | { | - |
133 | if (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 | } | 0 |
138 | } | 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 | */ | - |
145 | void 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 | | - |
151 | void 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 | | - |
158 | void 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 | } | 0 |
163 | | - |
164 | void 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 | } | 0 |
172 | | - |
173 | bool 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 | | - |
180 | bool 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 | | - |
201 | bool 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 | | - |
209 | bool 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 | | - |
235 | void 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 | | - |
240 | void 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 | | - |
247 | void 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 | } | 0 |
257 | | - |
258 | void 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 | } | 0 |
270 | | - |
271 | void 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 | } | 0 |
275 | | - |
276 | void 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 | } | 0 |
281 | | - |
282 | void 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 | | - |
288 | void 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() no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
300 | return; | 0 |
301 | | - |
302 | // Simple case: vertical deltas only: | - |
303 | 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 |
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; | 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 | } | 0 |
327 | | - |
328 | | - |
329 | QWindowSystemInterfacePrivate::ExposeEvent::ExposeEvent(QWindow *exposed, const QRegion ®ion) | - |
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 | | - |
337 | int QWindowSystemInterfacePrivate::windowSystemEventsQueued() | - |
338 | { | - |
339 | return windowSystemEventQueue.count(); executed: return windowSystemEventQueue.count(); Execution Count:654083 | 654083 |
340 | } | - |
341 | | - |
342 | QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent() | - |
343 | { | - |
344 | return windowSystemEventQueue.takeFirstOrReturnNull(); executed: return windowSystemEventQueue.takeFirstOrReturnNull(); Execution Count:11911 | 11911 |
345 | } | - |
346 | | - |
347 | QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() | - |
348 | { | - |
349 | return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull(); never executed: return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull(); | 0 |
350 | } | - |
351 | | - |
352 | QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::peekWindowSystemEvent(EventType t) | - |
353 | { | - |
354 | return windowSystemEventQueue.peekAtFirstOfType(t); executed: return windowSystemEventQueue.peekAtFirstOfType(t); Execution Count:702 | 702 |
355 | } | - |
356 | | - |
357 | void 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 | | - |
362 | void QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *ev) | - |
363 | { | - |
364 | if (synchronousWindowsSystemEvents) { partially evaluated: synchronousWindowsSystemEvents 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 { | 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 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 | | - |
374 | void 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 | | - |
379 | void 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 | | - |
386 | QList<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 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 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 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 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 | | - |
428 | void 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() no Evaluation Count:0 | yes Evaluation Count:49 |
| 0-49 |
432 | return; | 0 |
433 | | - |
434 | if (!QTouchDevicePrivate::isRegistered(device)) // Disallow passing bogus, non-registered devices. partially evaluated: !QTouchDevicePrivate::isRegistered(device) no Evaluation Count:0 | yes Evaluation Count:49 |
| 0-49 |
435 | 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 | | - |
445 | void 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 | | - |
452 | void 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 | | - |
461 | void 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 | | - |
468 | void 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 | } | 0 |
474 | | - |
475 | void 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 | } | 0 |
481 | | - |
482 | void 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 | } | 0 |
488 | | - |
489 | void 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 | } | 0 |
495 | | - |
496 | void 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 | } | 0 |
501 | | - |
502 | void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion ®ion) | - |
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 | | - |
508 | void 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 | | - |
513 | bool 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 | | - |
519 | void QWindowSystemInterface::setSynchronousWindowsSystemEvents(bool enable) | - |
520 | { | - |
521 | QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = enable; never executed (the execution status of this line is deduced): QWindowSystemInterfacePrivate::synchronousWindowsSystemEvents = enable; | - |
522 | } | 0 |
523 | | - |
524 | bool 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() 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) 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 no Evaluation Count:0 | yes Evaluation Count:11911 |
| 0-11911 |
534 | 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 | | - |
543 | int QWindowSystemInterface::windowSystemEventsQueued() | - |
544 | { | - |
545 | return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); executed: return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); Execution Count:639123 | 639123 |
546 | } | - |
547 | | - |
548 | #ifndef QT_NO_DRAGANDDROP | - |
549 | QPlatformDragQtResponse 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 | | - |
554 | QPlatformDropQtResponse 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 | | - |
567 | bool 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 | | - |
572 | void 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 | } | 0 |
577 | | - |
578 | void 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 | | - |
589 | void 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 | | - |
599 | void 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 | | - |
606 | void 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 | | - |
612 | void 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 | | - |
619 | void 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 | | - |
625 | void 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 | } | 0 |
631 | | - |
632 | #ifndef QT_NO_CONTEXTMENU | - |
633 | void 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 | } | 0 |
642 | #endif | - |
643 | | - |
644 | Q_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 | | - |
648 | Q_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 | | - |
653 | static 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 | } | - |
666 | static 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 | | - |
677 | Q_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 | | - |
684 | QT_END_NAMESPACE | - |
685 | | - |
| | |