qguistatemachine.cpp

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

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9