diff options
author | Aurindam Jana <[email protected]> | 2013-05-03 12:41:58 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2013-05-06 13:27:50 +0200 |
commit | 24af63ec4b9b32afeff4e5ab07186cf35e178f34 (patch) | |
tree | 349c87435ca4a85506d378cd8bc580d1879fead9 /src/plugins/android/androidrunner.cpp | |
parent | c9d1c5b3540971c2551e58e39d8715366b3c4d2a (diff) |
Android: Add QML profiling
Change-Id: Ie06c0b49707f8ec549f180f41c565fd223240186
Reviewed-by: Christiaan Janssen <[email protected]>
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/android/androidrunner.cpp')
-rw-r--r-- | src/plugins/android/androidrunner.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index a6f42fe0ac1..471c380f3bc 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -49,19 +49,23 @@ namespace Internal { typedef QLatin1String _; -AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode) +AndroidRunner::AndroidRunner(QObject *parent, + AndroidRunConfiguration *runConfig, + ProjectExplorer::RunMode runMode) : QThread(parent) { m_wasStarted = false; Debugger::DebuggerRunConfigurationAspect *aspect = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>(); + const bool debuggingMode = runMode == ProjectExplorer::DebugRunMode; m_useCppDebugger = debuggingMode && aspect->useCppDebugger(); m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger(); QString channel = runConfig->remoteChannel(); QTC_CHECK(channel.startsWith(QLatin1Char(':'))); m_localGdbServerPort = channel.mid(1).toUShort(); QTC_CHECK(m_localGdbServerPort); - if (m_useQmlDebugger) { + m_useQmlProfiler = runMode == ProjectExplorer::QmlProfilerRunMode; + if (m_useQmlDebugger || m_useQmlProfiler) { QTcpServer server; QTC_ASSERT(server.listen(QHostAddress::LocalHost) || server.listen(QHostAddress::LocalHostIPv6), @@ -220,7 +224,8 @@ void AndroidRunner::asyncStart() args << _("-e") << _("gdbserver_command") << m_gdbserverCommand; args << _("-e") << _("gdbserver_socket") << m_gdbserverSocket; } - if (m_useQmlDebugger) { + + if (m_useQmlDebugger || m_useQmlProfiler) { // currently forward to same port on device and host const QString port = QString::fromLatin1("tcp:%1").arg(m_qmlPort); QProcess adb; @@ -304,6 +309,8 @@ void AndroidRunner::asyncStart() // gdb. Afterwards this ends up in handleRemoteDebuggerRunning() below. QByteArray serverChannel = QByteArray::number(m_qmlPort); emit remoteServerRunning(serverChannel, m_processPID); + } else if (m_useQmlProfiler) { + emit remoteProcessStarted(m_qmlPort); } else { // Start without debugging. emit remoteProcessStarted(-1, -1); |