diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-23 19:17:25 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-11-23 19:17:25 +0000 |
commit | 746f54c6df0b6c08126b02ddc19e9e3010cb0d2d (patch) | |
tree | 0b50efabfdc1ea8acd61521fa6d2234effe3a1a9 /src/corelib/kernel | |
parent | 550fbf96b06bc9194388ccdae1a9e6116d959599 (diff) | |
parent | 1ed7a67a4cef8350103e4ea33b4bbd084f5d4c2d (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
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 { |