From 4ee4e51b58c4861b36fb44ff404e683ee21fb993 Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Mon, 22 Jul 2013 16:12:14 +0200 Subject: [PATCH] RemoteLinuxAnalyzeSupport: Notify engine when remote is running Change-Id: I214f133f34baf0e0d7fd5a9f23502e75a1932172 Reviewed-by: Christiaan Janssen --- .../remotelinux/remotelinuxanalyzesupport.cpp | 17 +++++++++++------ .../remotelinux/remotelinuxanalyzesupport.h | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp index c966a9d7181..8094f38e545 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp @@ -41,6 +41,7 @@ #include #include +#include #include @@ -64,6 +65,8 @@ public: const QPointer engine; bool qmlProfiling; int qmlPort; + + QmlDebug::QmlOutputParser outputParser; }; } // namespace Internal @@ -95,6 +98,8 @@ RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(RemoteLinuxRunConfiguration { connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)), SLOT(handleRemoteSetupRequested())); + connect(&d->outputParser, SIGNAL(waitingForConnectionOnPort(quint16)), + SLOT(remoteIsRunning())); } RemoteLinuxAnalyzeSupport::~RemoteLinuxAnalyzeSupport() @@ -106,6 +111,7 @@ void RemoteLinuxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFor { if (state() != Inactive && d->engine) d->engine->logApplicationMessage(msg, format); + d->outputParser.processOutput(msg); } void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested() @@ -170,6 +176,11 @@ void RemoteLinuxAnalyzeSupport::handleProfilingFinished() setFinished(); } +void RemoteLinuxAnalyzeSupport::remoteIsRunning() +{ + d->engine->notifyRemoteSetupDone(d->qmlPort); +} + void RemoteLinuxAnalyzeSupport::handleRemoteOutput(const QByteArray &output) { QTC_ASSERT(state() == Inactive || state() == Running, return); @@ -198,12 +209,6 @@ void RemoteLinuxAnalyzeSupport::handleAdapterSetupFailed(const QString &error) showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat); } -void RemoteLinuxAnalyzeSupport::handleAdapterSetupDone() -{ - AbstractRemoteLinuxRunSupport::handleAdapterSetupDone(); - d->engine->notifyRemoteSetupDone(d->qmlPort); -} - void RemoteLinuxAnalyzeSupport::handleRemoteProcessStarted() { QTC_ASSERT(d->qmlProfiling, return); diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.h b/src/plugins/remotelinux/remotelinuxanalyzesupport.h index cfbb1a7ff3e..98f713828cb 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.h @@ -59,7 +59,6 @@ public: protected: void startExecution(); void handleAdapterSetupFailed(const QString &error); - void handleAdapterSetupDone(); private slots: void handleRemoteSetupRequested(); @@ -72,6 +71,8 @@ private slots: void handleRemoteProcessStarted(); void handleProfilingFinished(); + void remoteIsRunning(); + private: void showMessage(const QString &, Utils::OutputFormat);