forked from qt-creator/qt-creator
iOS: Adapt to introduction of ProjectExplorer::ToolRunner
Change-Id: I53201edb58485c697c8c56db68ddefd3cf107193 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -34,15 +34,14 @@ using namespace ProjectExplorer;
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
IosAnalyzeSupport::IosAnalyzeSupport(IosRunConfiguration *runConfig,
|
||||
AnalyzerRunControl *runControl, bool cppDebug, bool qmlDebug)
|
||||
: QObject(runControl), m_runControl(runControl),
|
||||
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlProfilerServices :
|
||||
IosAnalyzeSupport::IosAnalyzeSupport(RunControl *runControl, bool cppDebug, bool qmlDebug)
|
||||
: ToolRunner(runControl),
|
||||
m_runner(new IosRunner(this, runControl, cppDebug, qmlDebug ? QmlDebug::QmlProfilerServices :
|
||||
QmlDebug::NoQmlDebugServices))
|
||||
{
|
||||
connect(m_runControl, &AnalyzerRunControl::starting,
|
||||
connect(runControl, &RunControl::starting,
|
||||
m_runner, &IosRunner::start);
|
||||
connect(m_runControl, &RunControl::finished,
|
||||
connect(runControl, &RunControl::finished,
|
||||
m_runner, &IosRunner::stop);
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||
this, &IosAnalyzeSupport::qmlServerReady);
|
||||
@@ -60,13 +59,9 @@ IosAnalyzeSupport::IosAnalyzeSupport(IosRunConfiguration *runConfig,
|
||||
this, &IosAnalyzeSupport::handleRemoteOutput);
|
||||
}
|
||||
|
||||
IosAnalyzeSupport::~IosAnalyzeSupport()
|
||||
{
|
||||
}
|
||||
|
||||
void IosAnalyzeSupport::qmlServerReady()
|
||||
{
|
||||
m_runControl->notifyRemoteSetupDone(m_qmlPort);
|
||||
runControl()->notifyRemoteSetupDone(m_qmlPort);
|
||||
}
|
||||
|
||||
void IosAnalyzeSupport::handleServerPorts(Utils::Port gdbServerPort, Utils::Port qmlPort)
|
||||
@@ -83,29 +78,28 @@ void IosAnalyzeSupport::handleGotInferiorPid(qint64 pid, Utils::Port qmlPort)
|
||||
|
||||
void IosAnalyzeSupport::handleRemoteProcessFinished(bool cleanEnd)
|
||||
{
|
||||
if (m_runControl) {
|
||||
if (!cleanEnd)
|
||||
m_runControl->appendMessage(tr("Run ended with error."), Utils::ErrorMessageFormat);
|
||||
else
|
||||
m_runControl->appendMessage(tr("Run ended."), Utils::NormalMessageFormat);
|
||||
m_runControl->notifyRemoteFinished();
|
||||
}
|
||||
if (!cleanEnd)
|
||||
runControl()->appendMessage(tr("Run ended with error."), Utils::ErrorMessageFormat);
|
||||
else
|
||||
appendMessage(tr("Run ended."), Utils::NormalMessageFormat);
|
||||
runControl()->notifyRemoteFinished();
|
||||
}
|
||||
|
||||
void IosAnalyzeSupport::handleRemoteOutput(const QString &output)
|
||||
{
|
||||
if (m_runControl) {
|
||||
m_runControl->appendMessage(output, Utils::StdOutFormat);
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
appendMessage(output, Utils::StdOutFormat);
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
|
||||
void IosAnalyzeSupport::handleRemoteErrorOutput(const QString &output)
|
||||
{
|
||||
if (m_runControl) {
|
||||
m_runControl->appendMessage(output, Utils::StdErrFormat);
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
appendMessage(output, Utils::StdErrFormat);
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
|
||||
AnalyzerRunControl *IosAnalyzeSupport::runControl()
|
||||
{
|
||||
return qobject_cast<AnalyzerRunControl *>(ToolRunner::runControl());
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user