summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-23 07:13:00 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-23 07:13:00 +0100
commit1ed7a67a4cef8350103e4ea33b4bbd084f5d4c2d (patch)
tree03dd7b6f8d9ccc02da6d0d882793ec62c71b00f7 /src/corelib/kernel/qcoreapplication.cpp
parentdbb7817e13bc7f7ccb8f04b00a65eb3dcf8d25f8 (diff)
parent6a2b17eeec2d171d2afa17bdbc36456346bfd13b (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/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp26
1 files changed, 20 insertions, 6 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.