summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioseventdispatcher.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-04-09 15:27:00 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-04-10 13:28:57 +0000
commit5414d372d42278b146ce1cdf1096c4e91e7039ad (patch)
tree9bfa13b7c1b8c407b92a44e5dc297c699ae3775c /src/plugins/platforms/ios/qioseventdispatcher.h
parentfdc28956c91f385ed1d049a62f99d0b714fd9eff (diff)
iOS: Send window-system event also when embedded in native iOS app
The iOS event dispatcher has been split into two; one dealing with the QPA event processing, which we should always do, and one dealing with the longjumping that we do when running the user's main on a separate stack. Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios/qioseventdispatcher.h')
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h
index 62133b9510..1f4c78dc74 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.h
+++ b/src/plugins/platforms/ios/qioseventdispatcher.h
@@ -49,18 +49,29 @@ class QIOSEventDispatcher : public QEventDispatcherCoreFoundation
Q_OBJECT
public:
+ static QIOSEventDispatcher* create();
+ bool processPostedEvents() override;
+
+protected:
explicit QIOSEventDispatcher(QObject *parent = 0);
+};
+
+class QIOSJumpingEventDispatcher : public QIOSEventDispatcher
+{
+ Q_OBJECT
+public:
+ QIOSJumpingEventDispatcher(QObject *parent = 0);
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
- bool processPostedEvents() override;
+ // Public since we can't friend Objective-C methods
void handleRunLoopExit(CFRunLoopActivity activity);
void interruptEventLoopExec();
private:
uint m_processEventLevel;
- RunLoopObserver<QIOSEventDispatcher> m_runLoopExitObserver;
+ RunLoopObserver<QIOSJumpingEventDispatcher> m_runLoopExitObserver;
};
QT_END_NAMESPACE