statemachine/qguistatemachine.cpp

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

Generated by Squish Coco Non-Commercial