diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-02-17 09:17:16 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-02-19 04:14:29 +0000 |
commit | d40aca0840ca998636f8bdbc217f2a0a5f89c2a6 (patch) | |
tree | d4df41961e19c2a0196a46c5c415e4dcb4b94014 /src/corelib/kernel/qeventdispatcher_cf.mm | |
parent | 34adce75c4610e44942e1c94d4ad744b830c6fe0 (diff) |
Factor out usage of a private symbol by the iOS platform plugin.
This fixes a link error due to symbol visibility when the iOS
platform plugin is built as a shared library.
Change-Id: I0b454c5c5033c6b598cede11ce5e3a85e5704c4a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_cf.mm')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_cf.mm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm index 55f27a5b60..437e4062ad 100644 --- a/src/corelib/kernel/qeventdispatcher_cf.mm +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -210,6 +210,13 @@ QEventDispatcherCoreFoundation::~QEventDispatcherCoreFoundation() m_cfSocketNotifier.removeSocketNotifiers(); } +QEventLoop *QEventDispatcherCoreFoundation::currentEventLoop() const +{ + QEventLoop *eventLoop = QThreadData::current()->eventLoops.top(); + Q_ASSERT(eventLoop); + return eventLoop; +} + /*! Processes all pending events that match \a flags until there are no more events to process. Returns \c true if pending events were handled; @@ -302,10 +309,7 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag // to exit, and then unwind back to the previous event loop which will break // immediately, since it has already been exited. - QEventLoop *currentEventLoop = QThreadData::current()->eventLoops.top(); - Q_ASSERT(currentEventLoop); - - if (!currentEventLoop->isRunning()) { + if (!currentEventLoop()->isRunning()) { qEventDispatcherDebug() << "Top level event loop was exited"; break; } else { |