forked from qt-creator/qt-creator
RemoteLinuxAnalyzeSupport: Notify engine when remote is running
Change-Id: I214f133f34baf0e0d7fd5a9f23502e75a1932172 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <qmldebug/qmloutputparser.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
@@ -64,6 +65,8 @@ public:
|
||||
const QPointer<IAnalyzerEngine> 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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user