QnxAnalyzeSupport: Notify engine when remote is running

Change-Id: Ie91b022b7f2d14f907edb0aa3a7cb2fda9c79f4a
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
Aurindam Jana
2013-07-22 16:11:23 +02:00
parent 871c9cfd3f
commit 0933e251ad
2 changed files with 13 additions and 8 deletions

View File

@@ -56,6 +56,8 @@ QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig,
connect(m_engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)),
SLOT(handleAdapterSetupRequested()));
connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
SLOT(remoteIsRunning()));
}
void QnxAnalyzeSupport::handleAdapterSetupRequested()
@@ -82,13 +84,6 @@ void QnxAnalyzeSupport::startExecution()
appRunner()->start(device(), command.toUtf8());
}
void QnxAnalyzeSupport::handleRemoteProcessStarted()
{
QnxAbstractRunSupport::handleRemoteProcessStarted();
if (m_engine)
m_engine->notifyRemoteSetupDone(m_qmlPort);
}
void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success)
{
if (m_engine || state() == Inactive)
@@ -127,8 +122,15 @@ void QnxAnalyzeSupport::handleError(const QString &error)
}
}
void QnxAnalyzeSupport::remoteIsRunning()
{
if (m_engine)
m_engine->notifyRemoteSetupDone(m_qmlPort);
}
void QnxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat format)
{
if (state() != Inactive && m_engine)
m_engine->logApplicationMessage(msg, format);
m_outputParser.processOutput(msg);
}

View File

@@ -34,6 +34,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/outputformat.h>
#include <qmldebug/qmloutputparser.h>
namespace Analyzer { class IAnalyzerEngine; }
@@ -54,17 +55,19 @@ public slots:
private slots:
void handleAdapterSetupRequested();
void handleRemoteProcessStarted();
void handleRemoteProcessFinished(bool success);
void handleProgressReport(const QString &progressOutput);
void handleRemoteOutput(const QByteArray &output);
void handleError(const QString &error);
void remoteIsRunning();
private:
void startExecution();
void showMessage(const QString &, Utils::OutputFormat);
Analyzer::IAnalyzerEngine *m_engine;
QmlDebug::QmlOutputParser m_outputParser;
int m_qmlPort;
};