diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-10 17:43:58 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-17 15:13:56 +0000 |
commit | 5f90990c308e2deddc3f9491262e354477ebe5f4 (patch) | |
tree | 65f7524332bc61168836ebf16fd5d84dc4deb083 /src/plugins/ios/iosrunner.cpp | |
parent | be31022276ced789d3a0ea2fb373a63a5921e157 (diff) | |
download | qt-creator-5f90990c308e2deddc3f9491262e354477ebe5f4.tar.gz |
Tell the QML debug server exactly what services we expect
The services need to be loaded before the first QML engine is created.
The first QML engine may be created before a client connects. When the
JavaScript debug service is loaded the engine is put into interpreter
mode as we don't support debugging in JIT mode. Profiling, however
should be done in JIT mode, whenever possible.
Thus, in order to avoid the loading of unnecessary plugins and to get
better results from the QML profiler we tell the debug server which
services we expect, even before the client connects. Qt 5.6 will support
additional command line arguments to specify the services and this
change uses them.
Change-Id: I6dcee016c39995e9adada6eaf0e39d8299c9b7e7
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/ios/iosrunner.cpp')
-rw-r--r-- | src/plugins/ios/iosrunner.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp index 83262715cc..fb90e0e1e9 100644 --- a/src/plugins/ios/iosrunner.cpp +++ b/src/plugins/ios/iosrunner.cpp @@ -43,6 +43,7 @@ #include <projectexplorer/taskhub.h> #include <projectexplorer/projectexplorerconstants.h> #include <debugger/debuggerrunconfigurationaspect.h> +#include <qmldebug/qmldebugcommandlinearguments.h> #include <QDir> #include <QTime> @@ -56,11 +57,12 @@ using namespace ProjectExplorer; namespace Ios { namespace Internal { -IosRunner::IosRunner(QObject *parent, IosRunConfiguration *runConfig, bool cppDebug, bool qmlDebug) +IosRunner::IosRunner(QObject *parent, IosRunConfiguration *runConfig, bool cppDebug, + QmlDebug::QmlDebugServicesPreset qmlDebugServices) : QObject(parent), m_toolHandler(0), m_bundleDir(runConfig->bundleDirectory().toString()), m_arguments(runConfig->commandLineArguments()), m_device(DeviceKitInformation::device(runConfig->target()->kit())), - m_cppDebug(cppDebug), m_qmlDebug(qmlDebug), m_cleanExit(false), + m_cppDebug(cppDebug), m_qmlDebugServices(qmlDebugServices), m_cleanExit(false), m_qmlPort(0), m_pid(0) { m_deviceType = runConfig->deviceType(); @@ -80,7 +82,7 @@ QStringList IosRunner::extraArgs() { QStringList res = m_arguments; if (m_qmlPort != 0) - res << QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(m_qmlPort); + res << QmlDebug::qmlDebugCommandLineArguments(m_qmlDebugServices, m_qmlPort); return res; } @@ -104,9 +106,9 @@ bool IosRunner::cppDebug() const return m_cppDebug; } -bool IosRunner::qmlDebug() const +QmlDebug::QmlDebugServicesPreset IosRunner::qmlDebugServices() const { - return m_qmlDebug; + return m_qmlDebugServices; } void IosRunner::start() @@ -130,7 +132,7 @@ void IosRunner::start() emit finished(m_cleanExit); return; } - if (m_qmlDebug) + if (m_qmlDebugServices != QmlDebug::NoQmlDebugServices) m_qmlPort = iosDevice->nextPort(); } else { IosSimulator::ConstPtr sim = m_device.dynamicCast<const IosSimulator>(); @@ -138,7 +140,7 @@ void IosRunner::start() emit finished(m_cleanExit); return; } - if (m_qmlDebug) + if (m_qmlDebugServices != QmlDebug::NoQmlDebugServices) m_qmlPort = sim->nextPort(); } |