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>
This commit is contained in:
parent
34adce75c4
commit
d40aca0840
@ -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 {
|
||||
|
@ -228,6 +228,8 @@ public:
|
||||
void flush();
|
||||
|
||||
protected:
|
||||
QEventLoop *currentEventLoop() const;
|
||||
|
||||
virtual bool processPostedEvents();
|
||||
|
||||
struct ProcessEventsState
|
||||
|
@ -493,7 +493,7 @@ void QIOSEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity)
|
||||
Q_UNUSED(activity);
|
||||
Q_ASSERT(activity == kCFRunLoopExit);
|
||||
|
||||
if (m_processEventLevel == 1 && !QThreadData::current()->eventLoops.top()->isRunning()) {
|
||||
if (m_processEventLevel == 1 && !currentEventLoop()->isRunning()) {
|
||||
qEventDispatcherDebug() << "Root runloop level exited";
|
||||
interruptEventLoopExec();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user