| 298 | } |
| 299 | |
| 300 | static bool eventCallback(void **data) |
| 301 | { |
| 302 | QEvent *event = reinterpret_cast<QEvent *>(data[1]); |
| 303 | QObject *receiver = reinterpret_cast<QObject *>(data[0]); |
| 304 | |
| 305 | if (!shouldBeRecorded(receiver, event)) |
| 306 | return false; |
| 307 | |
| 308 | EventData eventData = createEventData(receiver, event); |
| 309 | |
| 310 | if (!event->spontaneous() |
| 311 | && isInputEvent(event->type()) |
| 312 | && s_model->hasEvents() |
| 313 | && s_model->lastEvent().eventPtr == eventData.eventPtr |
| 314 | && s_model->lastEvent().type == event->type()) { |
| 315 | // this is an event propagated by a QQuickWindow to a child item: |
| 316 | s_model->lastEvent().propagatedEvents.append(eventData); |
| 317 | return false; |
| 318 | } |
| 319 | |
| 320 | // add directly from foreground thread, delay from background thread |
| 321 | QMetaObject::invokeMethod(s_eventMonitor, "addEvent", Qt::AutoConnection, Q_ARG(GammaRay::EventData, eventData)); |
| 322 | return false; |
| 323 | } |
| 324 | |
| 325 | |
| 326 | EventPropagationListener::EventPropagationListener(QObject *parent) |
nothing calls this directly
no test coverage detected