statemachine/qguistatemachine.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 -
42#include <QtCore/qstatemachine.h> -
43 -
44#ifndef QT_NO_STATEMACHINE -
45 -
46#include <private/qstatemachine_p.h> -
47#include <QtGui/qevent.h> -
48#include <QtWidgets/qgraphicssceneevent.h> -
49 -
50QT_BEGIN_NAMESPACE -
51 -
52Q_CORE_EXPORT const QStateMachinePrivate::Handler *qcoreStateMachineHandler(); -
53 -
54static QEvent *cloneEvent(QEvent *e) -
55{ -
56 switch (e->type()) { -
57 case QEvent::MouseButtonPress: -
58 case QEvent::MouseButtonRelease: -
59 case QEvent::MouseButtonDblClick: -
60 case QEvent::MouseMove: -
61 return new QMouseEvent(*static_cast<QMouseEvent*>(e));
executed: return new QMouseEvent(*static_cast<QMouseEvent*>(e));
Execution Count:14
14
62 case QEvent::KeyPress: -
63 case QEvent::KeyRelease: -
64 return new QKeyEvent(*static_cast<QKeyEvent*>(e));
executed: return new QKeyEvent(*static_cast<QKeyEvent*>(e));
Execution Count:2
2
65 case QEvent::FocusIn: -
66 case QEvent::FocusOut: -
67 return new QFocusEvent(*static_cast<QFocusEvent*>(e));
never executed: return new QFocusEvent(*static_cast<QFocusEvent*>(e));
0
68 case QEvent::Enter: -
69 return new QEvent(*e);
never executed: return new QEvent(*e);
0
70 case QEvent::Leave: -
71 return new QEvent(*e);
never executed: return new QEvent(*e);
0
72 case QEvent::Paint: -
73 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
74 break;
never executed: break;
0
75 case QEvent::Move: -
76 return new QMoveEvent(*static_cast<QMoveEvent*>(e));
never executed: return new QMoveEvent(*static_cast<QMoveEvent*>(e));
0
77 case QEvent::Resize: -
78 return new QResizeEvent(*static_cast<QResizeEvent*>(e));
never executed: return new QResizeEvent(*static_cast<QResizeEvent*>(e));
0
79 case QEvent::Create: -
80 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
81 break;
never executed: break;
0
82 case QEvent::Destroy: -
83 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
84 break;
never executed: break;
0
85 case QEvent::Show: -
86 return new QShowEvent(*static_cast<QShowEvent*>(e));
never executed: return new QShowEvent(*static_cast<QShowEvent*>(e));
0
87 case QEvent::Hide: -
88 return new QHideEvent(*static_cast<QHideEvent*>(e));
never executed: return new QHideEvent(*static_cast<QHideEvent*>(e));
0
89 case QEvent::Close: -
90 return new QCloseEvent(*static_cast<QCloseEvent*>(e));
never executed: return new QCloseEvent(*static_cast<QCloseEvent*>(e));
0
91 case QEvent::Quit: -
92 return new QEvent(*e);
never executed: return new QEvent(*e);
0
93 case QEvent::ParentChange: -
94 return new QEvent(*e);
never executed: return new QEvent(*e);
0
95 case QEvent::ParentAboutToChange: -
96 return new QEvent(*e);
never executed: return new QEvent(*e);
0
97 case QEvent::ThreadChange: -
98 return new QEvent(*e);
never executed: return new QEvent(*e);
0
99 -
100 case QEvent::WindowActivate: -
101 case QEvent::WindowDeactivate: -
102 return new QEvent(*e);
never executed: return new QEvent(*e);
0
103 -
104 case QEvent::ShowToParent: -
105 return new QEvent(*e);
never executed: return new QEvent(*e);
0
106 case QEvent::HideToParent: -
107 return new QEvent(*e);
never executed: return new QEvent(*e);
0
108#ifndef QT_NO_WHEELEVENT -
109 case QEvent::Wheel: -
110 return new QWheelEvent(*static_cast<QWheelEvent*>(e));
never executed: return new QWheelEvent(*static_cast<QWheelEvent*>(e));
0
111#endif //QT_NO_WHEELEVENT -
112 case QEvent::WindowTitleChange: -
113 return new QEvent(*e);
never executed: return new QEvent(*e);
0
114 case QEvent::WindowIconChange: -
115 return new QEvent(*e);
never executed: return new QEvent(*e);
0
116 case QEvent::ApplicationWindowIconChange: -
117 return new QEvent(*e);
never executed: return new QEvent(*e);
0
118 case QEvent::ApplicationFontChange: -
119 return new QEvent(*e);
never executed: return new QEvent(*e);
0
120 case QEvent::ApplicationLayoutDirectionChange: -
121 return new QEvent(*e);
never executed: return new QEvent(*e);
0
122 case QEvent::ApplicationPaletteChange: -
123 return new QEvent(*e);
never executed: return new QEvent(*e);
0
124 case QEvent::PaletteChange: -
125 return new QEvent(*e);
never executed: return new QEvent(*e);
0
126 case QEvent::Clipboard: -
127 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
128 break;
never executed: break;
0
129 case QEvent::Speech: -
130 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
131 break;
never executed: break;
0
132 case QEvent::MetaCall: -
133 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
134 break;
never executed: break;
0
135 case QEvent::SockAct: -
136 return new QEvent(*e);
never executed: return new QEvent(*e);
0
137 case QEvent::WinEventAct: -
138 return new QEvent(*e);
never executed: return new QEvent(*e);
0
139 case QEvent::DeferredDelete: -
140 return new QEvent(*e);
never executed: return new QEvent(*e);
0
141#ifndef QT_NO_DRAGANDDROP -
142 case QEvent::DragEnter: -
143 return new QDragEnterEvent(*static_cast<QDragEnterEvent*>(e));
never executed: return new QDragEnterEvent(*static_cast<QDragEnterEvent*>(e));
0
144 case QEvent::DragMove: -
145 return new QDragMoveEvent(*static_cast<QDragMoveEvent*>(e));
never executed: return new QDragMoveEvent(*static_cast<QDragMoveEvent*>(e));
0
146 case QEvent::DragLeave: -
147 return new QDragLeaveEvent(*static_cast<QDragLeaveEvent*>(e));
never executed: return new QDragLeaveEvent(*static_cast<QDragLeaveEvent*>(e));
0
148 case QEvent::Drop: -
149 return new QDropEvent(*static_cast<QDragMoveEvent*>(e));
never executed: return new QDropEvent(*static_cast<QDragMoveEvent*>(e));
0
150#endif -
151 case QEvent::ChildAdded: -
152 return new QChildEvent(*static_cast<QChildEvent*>(e));
never executed: return new QChildEvent(*static_cast<QChildEvent*>(e));
0
153 case QEvent::ChildPolished: -
154 return new QChildEvent(*static_cast<QChildEvent*>(e));
never executed: return new QChildEvent(*static_cast<QChildEvent*>(e));
0
155 case QEvent::ChildRemoved: -
156 return new QChildEvent(*static_cast<QChildEvent*>(e));
never executed: return new QChildEvent(*static_cast<QChildEvent*>(e));
0
157 case QEvent::ShowWindowRequest: -
158 return new QEvent(*e);
never executed: return new QEvent(*e);
0
159 case QEvent::PolishRequest: -
160 return new QEvent(*e);
never executed: return new QEvent(*e);
0
161 case QEvent::Polish: -
162 return new QEvent(*e);
never executed: return new QEvent(*e);
0
163 case QEvent::LayoutRequest: -
164 return new QEvent(*e);
never executed: return new QEvent(*e);
0
165 case QEvent::UpdateRequest: -
166 return new QEvent(*e);
never executed: return new QEvent(*e);
0
167 case QEvent::UpdateLater: -
168 return new QEvent(*e);
never executed: return new QEvent(*e);
0
169 -
170 case QEvent::EmbeddingControl: -
171 return new QEvent(*e);
never executed: return new QEvent(*e);
0
172 case QEvent::ActivateControl: -
173 return new QEvent(*e);
never executed: return new QEvent(*e);
0
174 case QEvent::DeactivateControl: -
175 return new QEvent(*e);
never executed: return new QEvent(*e);
0
176 -
177#ifndef QT_NO_CONTEXTMENU -
178 case QEvent::ContextMenu: -
179 return new QContextMenuEvent(*static_cast<QContextMenuEvent*>(e));
never executed: return new QContextMenuEvent(*static_cast<QContextMenuEvent*>(e));
0
180#endif -
181 case QEvent::InputMethod: -
182 return new QInputMethodEvent(*static_cast<QInputMethodEvent*>(e));
never executed: return new QInputMethodEvent(*static_cast<QInputMethodEvent*>(e));
0
183 case QEvent::LocaleChange: -
184 return new QEvent(*e);
never executed: return new QEvent(*e);
0
185 case QEvent::LanguageChange: -
186 return new QEvent(*e);
never executed: return new QEvent(*e);
0
187 case QEvent::LayoutDirectionChange: -
188 return new QEvent(*e);
never executed: return new QEvent(*e);
0
189 case QEvent::Style: -
190 return new QEvent(*e);
never executed: return new QEvent(*e);
0
191#ifndef QT_NO_TABLETEVENT -
192 case QEvent::TabletMove: -
193 case QEvent::TabletPress: -
194 case QEvent::TabletRelease: -
195 return new QTabletEvent(*static_cast<QTabletEvent*>(e));
never executed: return new QTabletEvent(*static_cast<QTabletEvent*>(e));
0
196#endif //QT_NO_TABLETEVENT -
197 case QEvent::OkRequest: -
198 return new QEvent(*e);
never executed: return new QEvent(*e);
0
199 case QEvent::HelpRequest: -
200 return new QEvent(*e);
never executed: return new QEvent(*e);
0
201 -
202 case QEvent::IconDrag: -
203 return new QIconDragEvent(*static_cast<QIconDragEvent*>(e));
never executed: return new QIconDragEvent(*static_cast<QIconDragEvent*>(e));
0
204 -
205 case QEvent::FontChange: -
206 return new QEvent(*e);
never executed: return new QEvent(*e);
0
207 case QEvent::EnabledChange: -
208 return new QEvent(*e);
never executed: return new QEvent(*e);
0
209 case QEvent::ActivationChange: -
210 return new QEvent(*e);
never executed: return new QEvent(*e);
0
211 case QEvent::StyleChange: -
212 return new QEvent(*e);
never executed: return new QEvent(*e);
0
213 case QEvent::IconTextChange: -
214 return new QEvent(*e);
never executed: return new QEvent(*e);
0
215 case QEvent::ModifiedChange: -
216 return new QEvent(*e);
never executed: return new QEvent(*e);
0
217 case QEvent::MouseTrackingChange: -
218 return new QEvent(*e);
never executed: return new QEvent(*e);
0
219 -
220 case QEvent::WindowBlocked: -
221 return new QEvent(*e);
never executed: return new QEvent(*e);
0
222 case QEvent::WindowUnblocked: -
223 return new QEvent(*e);
never executed: return new QEvent(*e);
0
224 case QEvent::WindowStateChange: -
225 return new QWindowStateChangeEvent(*static_cast<QWindowStateChangeEvent*>(e));
never executed: return new QWindowStateChangeEvent(*static_cast<QWindowStateChangeEvent*>(e));
0
226 -
227 case QEvent::ToolTip: -
228 return new QHelpEvent(*static_cast<QHelpEvent*>(e));
never executed: return new QHelpEvent(*static_cast<QHelpEvent*>(e));
0
229 case QEvent::WhatsThis: -
230 return new QHelpEvent(*static_cast<QHelpEvent*>(e));
never executed: return new QHelpEvent(*static_cast<QHelpEvent*>(e));
0
231#ifndef QT_NO_STATUSTIP -
232 case QEvent::StatusTip: -
233 return new QStatusTipEvent(*static_cast<QStatusTipEvent*>(e));
never executed: return new QStatusTipEvent(*static_cast<QStatusTipEvent*>(e));
0
234#endif //QT_NO_STATUSTIP -
235#ifndef QT_NO_ACTION -
236 case QEvent::ActionChanged: -
237 case QEvent::ActionAdded: -
238 case QEvent::ActionRemoved: -
239 return new QActionEvent(*static_cast<QActionEvent*>(e));
never executed: return new QActionEvent(*static_cast<QActionEvent*>(e));
0
240#endif -
241 case QEvent::FileOpen: -
242 return new QFileOpenEvent(*static_cast<QFileOpenEvent*>(e));
never executed: return new QFileOpenEvent(*static_cast<QFileOpenEvent*>(e));
0
243 -
244#ifndef QT_NO_SHORTCUT -
245 case QEvent::Shortcut: -
246 return new QShortcutEvent(*static_cast<QShortcutEvent*>(e));
never executed: return new QShortcutEvent(*static_cast<QShortcutEvent*>(e));
0
247#endif //QT_NO_SHORTCUT -
248 case QEvent::ShortcutOverride: -
249 return new QKeyEvent(*static_cast<QKeyEvent*>(e));
never executed: return new QKeyEvent(*static_cast<QKeyEvent*>(e));
0
250 -
251#ifndef QT_NO_WHATSTHIS -
252 case QEvent::WhatsThisClicked: -
253 return new QWhatsThisClickedEvent(*static_cast<QWhatsThisClickedEvent*>(e));
never executed: return new QWhatsThisClickedEvent(*static_cast<QWhatsThisClickedEvent*>(e));
0
254#endif //QT_NO_WHATSTHIS -
255 -
256#ifndef QT_NO_TOOLBAR -
257 case QEvent::ToolBarChange: -
258 return new QToolBarChangeEvent(*static_cast<QToolBarChangeEvent*>(e));
never executed: return new QToolBarChangeEvent(*static_cast<QToolBarChangeEvent*>(e));
0
259#endif //QT_NO_TOOLBAR -
260 -
261 case QEvent::ApplicationActivate: -
262 return new QEvent(*e);
executed: return new QEvent(*e);
Execution Count:1
1
263 case QEvent::ApplicationDeactivate: -
264 return new QEvent(*e);
never executed: return new QEvent(*e);
0
265 -
266 case QEvent::QueryWhatsThis: -
267 return new QHelpEvent(*static_cast<QHelpEvent*>(e));
never executed: return new QHelpEvent(*static_cast<QHelpEvent*>(e));
0
268 case QEvent::EnterWhatsThisMode: -
269 return new QEvent(*e);
never executed: return new QEvent(*e);
0
270 case QEvent::LeaveWhatsThisMode: -
271 return new QEvent(*e);
never executed: return new QEvent(*e);
0
272 -
273 case QEvent::ZOrderChange: -
274 return new QEvent(*e);
never executed: return new QEvent(*e);
0
275 -
276 case QEvent::HoverEnter: -
277 case QEvent::HoverLeave: -
278 case QEvent::HoverMove: -
279 return new QHoverEvent(*static_cast<QHoverEvent*>(e));
never executed: return new QHoverEvent(*static_cast<QHoverEvent*>(e));
0
280 -
281#ifdef QT_KEYPAD_NAVIGATION -
282 case QEvent::EnterEditFocus: -
283 return new QEvent(*e); -
284 case QEvent::LeaveEditFocus: -
285 return new QEvent(*e); -
286#endif -
287 case QEvent::AcceptDropsChange: -
288 return new QEvent(*e);
never executed: return new QEvent(*e);
0
289 -
290 case QEvent::ZeroTimerEvent: -
291 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
292 break;
never executed: break;
0
293#ifndef QT_NO_GRAPHICSVIEW -
294 case QEvent::GraphicsSceneMouseMove: -
295 case QEvent::GraphicsSceneMousePress: -
296 case QEvent::GraphicsSceneMouseRelease: -
297 case QEvent::GraphicsSceneMouseDoubleClick: { -
298 QGraphicsSceneMouseEvent *me = static_cast<QGraphicsSceneMouseEvent*>(e);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEvent *me = static_cast<QGraphicsSceneMouseEvent*>(e);
-
299 QGraphicsSceneMouseEvent *me2 = new QGraphicsSceneMouseEvent(me->type());
executed (the execution status of this line is deduced): QGraphicsSceneMouseEvent *me2 = new QGraphicsSceneMouseEvent(me->type());
-
300 me2->setWidget(me->widget());
executed (the execution status of this line is deduced): me2->setWidget(me->widget());
-
301 me2->setPos(me->pos());
executed (the execution status of this line is deduced): me2->setPos(me->pos());
-
302 me2->setScenePos(me->scenePos());
executed (the execution status of this line is deduced): me2->setScenePos(me->scenePos());
-
303 me2->setScreenPos(me->screenPos());
executed (the execution status of this line is deduced): me2->setScreenPos(me->screenPos());
-
304// ### for all buttons -
305 me2->setButtonDownPos(Qt::LeftButton, me->buttonDownPos(Qt::LeftButton));
executed (the execution status of this line is deduced): me2->setButtonDownPos(Qt::LeftButton, me->buttonDownPos(Qt::LeftButton));
-
306 me2->setButtonDownPos(Qt::RightButton, me->buttonDownPos(Qt::RightButton));
executed (the execution status of this line is deduced): me2->setButtonDownPos(Qt::RightButton, me->buttonDownPos(Qt::RightButton));
-
307 me2->setButtonDownScreenPos(Qt::LeftButton, me->buttonDownScreenPos(Qt::LeftButton));
executed (the execution status of this line is deduced): me2->setButtonDownScreenPos(Qt::LeftButton, me->buttonDownScreenPos(Qt::LeftButton));
-
308 me2->setButtonDownScreenPos(Qt::RightButton, me->buttonDownScreenPos(Qt::RightButton));
executed (the execution status of this line is deduced): me2->setButtonDownScreenPos(Qt::RightButton, me->buttonDownScreenPos(Qt::RightButton));
-
309 me2->setLastPos(me->lastPos());
executed (the execution status of this line is deduced): me2->setLastPos(me->lastPos());
-
310 me2->setLastScenePos(me->lastScenePos());
executed (the execution status of this line is deduced): me2->setLastScenePos(me->lastScenePos());
-
311 me2->setLastScreenPos(me->lastScreenPos());
executed (the execution status of this line is deduced): me2->setLastScreenPos(me->lastScreenPos());
-
312 me2->setButtons(me->buttons());
executed (the execution status of this line is deduced): me2->setButtons(me->buttons());
-
313 me2->setButton(me->button());
executed (the execution status of this line is deduced): me2->setButton(me->button());
-
314 me2->setModifiers(me->modifiers());
executed (the execution status of this line is deduced): me2->setModifiers(me->modifiers());
-
315 return me2;
executed: return me2;
Execution Count:1
1
316 } -
317 -
318 case QEvent::GraphicsSceneContextMenu: { -
319 QGraphicsSceneContextMenuEvent *me = static_cast<QGraphicsSceneContextMenuEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEvent *me = static_cast<QGraphicsSceneContextMenuEvent*>(e);
-
320 QGraphicsSceneContextMenuEvent *me2 = new QGraphicsSceneContextMenuEvent(me->type());
never executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEvent *me2 = new QGraphicsSceneContextMenuEvent(me->type());
-
321 me2->setWidget(me->widget());
never executed (the execution status of this line is deduced): me2->setWidget(me->widget());
-
322 me2->setPos(me->pos());
never executed (the execution status of this line is deduced): me2->setPos(me->pos());
-
323 me2->setScenePos(me->scenePos());
never executed (the execution status of this line is deduced): me2->setScenePos(me->scenePos());
-
324 me2->setScreenPos(me->screenPos());
never executed (the execution status of this line is deduced): me2->setScreenPos(me->screenPos());
-
325 me2->setModifiers(me->modifiers());
never executed (the execution status of this line is deduced): me2->setModifiers(me->modifiers());
-
326 me2->setReason(me->reason());
never executed (the execution status of this line is deduced): me2->setReason(me->reason());
-
327 return me2;
never executed: return me2;
0
328 } -
329 -
330 case QEvent::GraphicsSceneHoverEnter: -
331 case QEvent::GraphicsSceneHoverMove: -
332 case QEvent::GraphicsSceneHoverLeave: { -
333 QGraphicsSceneHoverEvent *he = static_cast<QGraphicsSceneHoverEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneHoverEvent *he = static_cast<QGraphicsSceneHoverEvent*>(e);
-
334 QGraphicsSceneHoverEvent *he2 = new QGraphicsSceneHoverEvent(he->type());
never executed (the execution status of this line is deduced): QGraphicsSceneHoverEvent *he2 = new QGraphicsSceneHoverEvent(he->type());
-
335 he2->setPos(he->pos());
never executed (the execution status of this line is deduced): he2->setPos(he->pos());
-
336 he2->setScenePos(he->scenePos());
never executed (the execution status of this line is deduced): he2->setScenePos(he->scenePos());
-
337 he2->setScreenPos(he->screenPos());
never executed (the execution status of this line is deduced): he2->setScreenPos(he->screenPos());
-
338 he2->setLastPos(he->lastPos());
never executed (the execution status of this line is deduced): he2->setLastPos(he->lastPos());
-
339 he2->setLastScenePos(he->lastScenePos());
never executed (the execution status of this line is deduced): he2->setLastScenePos(he->lastScenePos());
-
340 he2->setLastScreenPos(he->lastScreenPos());
never executed (the execution status of this line is deduced): he2->setLastScreenPos(he->lastScreenPos());
-
341 he2->setModifiers(he->modifiers());
never executed (the execution status of this line is deduced): he2->setModifiers(he->modifiers());
-
342 return he2;
never executed: return he2;
0
343 } -
344 case QEvent::GraphicsSceneHelp: -
345 return new QHelpEvent(*static_cast<QHelpEvent*>(e));
never executed: return new QHelpEvent(*static_cast<QHelpEvent*>(e));
0
346 case QEvent::GraphicsSceneDragEnter: -
347 case QEvent::GraphicsSceneDragMove: -
348 case QEvent::GraphicsSceneDragLeave: -
349 case QEvent::GraphicsSceneDrop: { -
350 QGraphicsSceneDragDropEvent *dde = static_cast<QGraphicsSceneDragDropEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEvent *dde = static_cast<QGraphicsSceneDragDropEvent*>(e);
-
351 QGraphicsSceneDragDropEvent *dde2 = new QGraphicsSceneDragDropEvent(dde->type());
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEvent *dde2 = new QGraphicsSceneDragDropEvent(dde->type());
-
352 dde2->setPos(dde->pos());
never executed (the execution status of this line is deduced): dde2->setPos(dde->pos());
-
353 dde2->setScenePos(dde->scenePos());
never executed (the execution status of this line is deduced): dde2->setScenePos(dde->scenePos());
-
354 dde2->setScreenPos(dde->screenPos());
never executed (the execution status of this line is deduced): dde2->setScreenPos(dde->screenPos());
-
355 dde2->setButtons(dde->buttons());
never executed (the execution status of this line is deduced): dde2->setButtons(dde->buttons());
-
356 dde2->setModifiers(dde->modifiers());
never executed (the execution status of this line is deduced): dde2->setModifiers(dde->modifiers());
-
357 return dde2;
never executed: return dde2;
0
358 } -
359 case QEvent::GraphicsSceneWheel: { -
360 QGraphicsSceneWheelEvent *we = static_cast<QGraphicsSceneWheelEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneWheelEvent *we = static_cast<QGraphicsSceneWheelEvent*>(e);
-
361 QGraphicsSceneWheelEvent *we2 = new QGraphicsSceneWheelEvent(we->type());
never executed (the execution status of this line is deduced): QGraphicsSceneWheelEvent *we2 = new QGraphicsSceneWheelEvent(we->type());
-
362 we2->setPos(we->pos());
never executed (the execution status of this line is deduced): we2->setPos(we->pos());
-
363 we2->setScenePos(we->scenePos());
never executed (the execution status of this line is deduced): we2->setScenePos(we->scenePos());
-
364 we2->setScreenPos(we->screenPos());
never executed (the execution status of this line is deduced): we2->setScreenPos(we->screenPos());
-
365 we2->setButtons(we->buttons());
never executed (the execution status of this line is deduced): we2->setButtons(we->buttons());
-
366 we2->setModifiers(we->modifiers());
never executed (the execution status of this line is deduced): we2->setModifiers(we->modifiers());
-
367 we2->setOrientation(we->orientation());
never executed (the execution status of this line is deduced): we2->setOrientation(we->orientation());
-
368 we2->setDelta(we->delta());
never executed (the execution status of this line is deduced): we2->setDelta(we->delta());
-
369 return we2;
never executed: return we2;
0
370 } -
371#endif -
372 case QEvent::KeyboardLayoutChange: -
373 return new QEvent(*e);
never executed: return new QEvent(*e);
0
374 -
375 case QEvent::DynamicPropertyChange: -
376 return new QDynamicPropertyChangeEvent(*static_cast<QDynamicPropertyChangeEvent*>(e));
never executed: return new QDynamicPropertyChangeEvent(*static_cast<QDynamicPropertyChangeEvent*>(e));
0
377 -
378#ifndef QT_NO_TABLETEVENT -
379 case QEvent::TabletEnterProximity: -
380 case QEvent::TabletLeaveProximity: -
381 return new QTabletEvent(*static_cast<QTabletEvent*>(e));
never executed: return new QTabletEvent(*static_cast<QTabletEvent*>(e));
0
382#endif //QT_NO_TABLETEVENT -
383 -
384 case QEvent::NonClientAreaMouseMove: -
385 case QEvent::NonClientAreaMouseButtonPress: -
386 case QEvent::NonClientAreaMouseButtonRelease: -
387 case QEvent::NonClientAreaMouseButtonDblClick: -
388 return new QMouseEvent(*static_cast<QMouseEvent*>(e));
never executed: return new QMouseEvent(*static_cast<QMouseEvent*>(e));
0
389 -
390 case QEvent::MacSizeChange: -
391 return new QEvent(*e);
never executed: return new QEvent(*e);
0
392 -
393 case QEvent::ContentsRectChange: -
394 return new QEvent(*e);
never executed: return new QEvent(*e);
0
395 -
396 case QEvent::MacGLWindowChange: -
397 return new QEvent(*e);
never executed: return new QEvent(*e);
0
398 -
399 case QEvent::FutureCallOut: -
400 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
401 break;
never executed: break;
0
402#ifndef QT_NO_GRAPHICSVIEW -
403 case QEvent::GraphicsSceneResize: { -
404 QGraphicsSceneResizeEvent *re = static_cast<QGraphicsSceneResizeEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneResizeEvent *re = static_cast<QGraphicsSceneResizeEvent*>(e);
-
405 QGraphicsSceneResizeEvent *re2 = new QGraphicsSceneResizeEvent();
never executed (the execution status of this line is deduced): QGraphicsSceneResizeEvent *re2 = new QGraphicsSceneResizeEvent();
-
406 re2->setOldSize(re->oldSize());
never executed (the execution status of this line is deduced): re2->setOldSize(re->oldSize());
-
407 re2->setNewSize(re->newSize());
never executed (the execution status of this line is deduced): re2->setNewSize(re->newSize());
-
408 return re2;
never executed: return re2;
0
409 } -
410 case QEvent::GraphicsSceneMove: { -
411 QGraphicsSceneMoveEvent *me = static_cast<QGraphicsSceneMoveEvent*>(e);
never executed (the execution status of this line is deduced): QGraphicsSceneMoveEvent *me = static_cast<QGraphicsSceneMoveEvent*>(e);
-
412 QGraphicsSceneMoveEvent *me2 = new QGraphicsSceneMoveEvent();
never executed (the execution status of this line is deduced): QGraphicsSceneMoveEvent *me2 = new QGraphicsSceneMoveEvent();
-
413 me2->setWidget(me->widget());
never executed (the execution status of this line is deduced): me2->setWidget(me->widget());
-
414 me2->setNewPos(me->newPos());
never executed (the execution status of this line is deduced): me2->setNewPos(me->newPos());
-
415 me2->setOldPos(me->oldPos());
never executed (the execution status of this line is deduced): me2->setOldPos(me->oldPos());
-
416 return me2;
never executed: return me2;
0
417 } -
418#endif -
419 case QEvent::CursorChange: -
420 return new QEvent(*e);
never executed: return new QEvent(*e);
0
421 case QEvent::ToolTipChange: -
422 return new QEvent(*e);
never executed: return new QEvent(*e);
0
423 -
424 case QEvent::NetworkReplyUpdated: -
425 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
426 break;
never executed: break;
0
427 -
428 case QEvent::GrabMouse: -
429 case QEvent::UngrabMouse: -
430 case QEvent::GrabKeyboard: -
431 case QEvent::UngrabKeyboard: -
432 return new QEvent(*e);
never executed: return new QEvent(*e);
0
433 -
434 case QEvent::TouchBegin: -
435 case QEvent::TouchUpdate: -
436 case QEvent::TouchEnd: -
437 return new QTouchEvent(*static_cast<QTouchEvent*>(e));
never executed: return new QTouchEvent(*static_cast<QTouchEvent*>(e));
0
438 -
439#ifndef QT_NO_GESTURES -
440 case QEvent::NativeGesture: -
441 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
442 break;
never executed: break;
0
443#endif -
444 -
445 case QEvent::User: -
446 case QEvent::MaxUser: -
447 Q_ASSERT_X(false, "cloneEvent()", "not implemented");
never executed (the execution status of this line is deduced): qt_noop();
-
448 break;
never executed: break;
0
449 default: -
450 ; -
451 }
executed: }
Execution Count:7
7
452 return qcoreStateMachineHandler()->cloneEvent(e);
executed: return qcoreStateMachineHandler()->cloneEvent(e);
Execution Count:7
7
453} -
454 -
455const QStateMachinePrivate::Handler qt_gui_statemachine_handler = { -
456 cloneEvent -
457}; -
458 -
459static const QStateMachinePrivate::Handler *qt_guistatemachine_last_handler = 0; -
460void qRegisterGuiStateMachine() -
461{ -
462 qt_guistatemachine_last_handler = QStateMachinePrivate::handler;
executed (the execution status of this line is deduced): qt_guistatemachine_last_handler = QStateMachinePrivate::handler;
-
463 QStateMachinePrivate::handler = &qt_gui_statemachine_handler;
executed (the execution status of this line is deduced): QStateMachinePrivate::handler = &qt_gui_statemachine_handler;
-
464}
executed: }
Execution Count:351
351
465Q_CONSTRUCTOR_FUNCTION(qRegisterGuiStateMachine)
executed: }
Execution Count:136
136
466 -
467void qUnregisterGuiStateMachine() -
468{ -
469 QStateMachinePrivate::handler = qt_guistatemachine_last_handler;
executed (the execution status of this line is deduced): QStateMachinePrivate::handler = qt_guistatemachine_last_handler;
-
470}
executed: }
Execution Count:213
213
471Q_DESTRUCTOR_FUNCTION(qUnregisterGuiStateMachine)
never executed: }
0
472 -
473QT_END_NAMESPACE -
474 -
475#endif //QT_NO_STATEMACHINE -
476 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial