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();
|
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
|
Processes all pending events that match \a flags until there are no
|
||||||
more events to process. Returns \c true if pending events were handled;
|
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
|
// to exit, and then unwind back to the previous event loop which will break
|
||||||
// immediately, since it has already been exited.
|
// immediately, since it has already been exited.
|
||||||
|
|
||||||
QEventLoop *currentEventLoop = QThreadData::current()->eventLoops.top();
|
if (!currentEventLoop()->isRunning()) {
|
||||||
Q_ASSERT(currentEventLoop);
|
|
||||||
|
|
||||||
if (!currentEventLoop->isRunning()) {
|
|
||||||
qEventDispatcherDebug() << "Top level event loop was exited";
|
qEventDispatcherDebug() << "Top level event loop was exited";
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -228,6 +228,8 @@ public:
|
|||||||
void flush();
|
void flush();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
QEventLoop *currentEventLoop() const;
|
||||||
|
|
||||||
virtual bool processPostedEvents();
|
virtual bool processPostedEvents();
|
||||||
|
|
||||||
struct ProcessEventsState
|
struct ProcessEventsState
|
||||||
|
@ -493,7 +493,7 @@ void QIOSEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity)
|
|||||||
Q_UNUSED(activity);
|
Q_UNUSED(activity);
|
||||||
Q_ASSERT(activity == kCFRunLoopExit);
|
Q_ASSERT(activity == kCFRunLoopExit);
|
||||||
|
|
||||||
if (m_processEventLevel == 1 && !QThreadData::current()->eventLoops.top()->isRunning()) {
|
if (m_processEventLevel == 1 && !currentEventLoop()->isRunning()) {
|
||||||
qEventDispatcherDebug() << "Root runloop level exited";
|
qEventDispatcherDebug() << "Root runloop level exited";
|
||||||
interruptEventLoopExec();
|
interruptEventLoopExec();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user