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 <projectexplorer/kitinformation.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <qmldebug/qmloutputparser.h>
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
@@ -64,6 +65,8 @@ public:
|
|||||||
const QPointer<IAnalyzerEngine> engine;
|
const QPointer<IAnalyzerEngine> engine;
|
||||||
bool qmlProfiling;
|
bool qmlProfiling;
|
||||||
int qmlPort;
|
int qmlPort;
|
||||||
|
|
||||||
|
QmlDebug::QmlOutputParser outputParser;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -95,6 +98,8 @@ RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(RemoteLinuxRunConfiguration
|
|||||||
{
|
{
|
||||||
connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)),
|
connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)),
|
||||||
SLOT(handleRemoteSetupRequested()));
|
SLOT(handleRemoteSetupRequested()));
|
||||||
|
connect(&d->outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
|
||||||
|
SLOT(remoteIsRunning()));
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxAnalyzeSupport::~RemoteLinuxAnalyzeSupport()
|
RemoteLinuxAnalyzeSupport::~RemoteLinuxAnalyzeSupport()
|
||||||
@@ -106,6 +111,7 @@ void RemoteLinuxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFor
|
|||||||
{
|
{
|
||||||
if (state() != Inactive && d->engine)
|
if (state() != Inactive && d->engine)
|
||||||
d->engine->logApplicationMessage(msg, format);
|
d->engine->logApplicationMessage(msg, format);
|
||||||
|
d->outputParser.processOutput(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested()
|
void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested()
|
||||||
@@ -170,6 +176,11 @@ void RemoteLinuxAnalyzeSupport::handleProfilingFinished()
|
|||||||
setFinished();
|
setFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RemoteLinuxAnalyzeSupport::remoteIsRunning()
|
||||||
|
{
|
||||||
|
d->engine->notifyRemoteSetupDone(d->qmlPort);
|
||||||
|
}
|
||||||
|
|
||||||
void RemoteLinuxAnalyzeSupport::handleRemoteOutput(const QByteArray &output)
|
void RemoteLinuxAnalyzeSupport::handleRemoteOutput(const QByteArray &output)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == Inactive || state() == Running, return);
|
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);
|
showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxAnalyzeSupport::handleAdapterSetupDone()
|
|
||||||
{
|
|
||||||
AbstractRemoteLinuxRunSupport::handleAdapterSetupDone();
|
|
||||||
d->engine->notifyRemoteSetupDone(d->qmlPort);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoteLinuxAnalyzeSupport::handleRemoteProcessStarted()
|
void RemoteLinuxAnalyzeSupport::handleRemoteProcessStarted()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->qmlProfiling, return);
|
QTC_ASSERT(d->qmlProfiling, return);
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void startExecution();
|
void startExecution();
|
||||||
void handleAdapterSetupFailed(const QString &error);
|
void handleAdapterSetupFailed(const QString &error);
|
||||||
void handleAdapterSetupDone();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleRemoteSetupRequested();
|
void handleRemoteSetupRequested();
|
||||||
@@ -72,6 +71,8 @@ private slots:
|
|||||||
void handleRemoteProcessStarted();
|
void handleRemoteProcessStarted();
|
||||||
void handleProfilingFinished();
|
void handleProfilingFinished();
|
||||||
|
|
||||||
|
void remoteIsRunning();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void showMessage(const QString &, Utils::OutputFormat);
|
void showMessage(const QString &, Utils::OutputFormat);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user