diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-07-04 00:20:37 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-08-09 07:24:15 +0000 |
commit | a09c8b0ee6ddd13251ee1335ede73fd66e007a35 (patch) | |
tree | 9c7cb2af31892edc16b696c86bde948152b8cb2f /src/plugins/platforms/cocoa | |
parent | 489ae6db3c1d4c78b60f67d1c64e6bdb820560eb (diff) |
Make QEventDispatcherCoreFoundaton work on secondary threads
We were using CFRunLoopGetMain() everywhere. Get the
correct run loop using CFRunLoopGetCurrent() during
initialization, and store it.
Event dispatcher initialization must now be delayed
until after the constructor has run, since event dispatchers
may be created on the main thread and then moved to
the target thread. Initialize on first call to processEvents()
where the current thread will be the correct thread.
Use the stored m_runLoop instead of CFRunLoopGetMain().
This is required for wakeUp() and interrupt() which
may be called from another thread.
Change-Id: I6fffcfd4394899c4a12f241c42781979aaf99d5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
0 files changed, 0 insertions, 0 deletions