diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-23 07:13:00 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-23 07:13:00 +0100 |
commit | 1ed7a67a4cef8350103e4ea33b4bbd084f5d4c2d (patch) | |
tree | 03dd7b6f8d9ccc02da6d0d882793ec62c71b00f7 /src/corelib/kernel | |
parent | dbb7817e13bc7f7ccb8f04b00a65eb3dcf8d25f8 (diff) | |
parent | 6a2b17eeec2d171d2afa17bdbc36456346bfd13b (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/corelib/kernel/qcoreapplication.cpp
src/corelib/thread/qthread_unix.cpp
Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 26 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_cf.mm | 3 |
2 files changed, 22 insertions, 7 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 53206cfb8c..e64ee04134 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -66,8 +66,12 @@ #ifndef QT_NO_QOBJECT #if defined(Q_OS_UNIX) -# if !defined(QT_NO_GLIB) -# include "qeventdispatcher_glib_p.h" +# if defined(Q_OS_OSX) +# include "qeventdispatcher_cf_p.h" +# else +# if !defined(QT_NO_GLIB) +# include "qeventdispatcher_glib_p.h" +# endif # endif # include "qeventdispatcher_unix_p.h" #endif @@ -469,12 +473,21 @@ void QCoreApplicationPrivate::createEventDispatcher() { Q_Q(QCoreApplication); #if defined(Q_OS_UNIX) -# if !defined(QT_NO_GLIB) +# if defined(Q_OS_OSX) + bool ok = false; + int value = qEnvironmentVariableIntValue("QT_EVENT_DISPATCHER_CORE_FOUNDATION", &ok); + if (ok && value > 0) + eventDispatcher = new QEventDispatcherCoreFoundation(q); + else + eventDispatcher = new QEventDispatcherUNIX(q); +# elif !defined(QT_NO_GLIB) if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && QEventDispatcherGlib::versionSupported()) eventDispatcher = new QEventDispatcherGlib(q); else -# endif eventDispatcher = new QEventDispatcherUNIX(q); +# else + eventDispatcher = new QEventDispatcherUNIX(q); +# endif #elif defined(Q_OS_WINRT) eventDispatcher = new QEventDispatcherWinRT(q); #elif defined(Q_OS_WIN) @@ -613,8 +626,9 @@ void QCoreApplicationPrivate::initLocale() The command line arguments which are passed to QCoreApplication's constructor should be accessed using the arguments() function. - Note that some arguments supplied by the user may have been - processed and removed by QCoreApplication. + + \note QCoreApplication removes option \c -qmljsdebugger="...". It parses the + argument of \c qmljsdebugger, and then removes this option plus its argument. For more advanced command line option handling, create a QCommandLineParser. diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm index 240dfed79f..8422345968 100644 --- a/src/corelib/kernel/qeventdispatcher_cf.mm +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -49,6 +49,8 @@ # include <UIKit/UIApplication.h> #endif +QT_USE_NAMESPACE + @interface RunLoopModeTracker : NSObject { QStack<CFStringRef> m_runLoopModes; } @@ -119,7 +121,6 @@ static CFStringRef runLoopMode(NSDictionary *dictionary) @end QT_BEGIN_NAMESPACE -QT_USE_NAMESPACE class RunLoopDebugger : public QObject { |