forked from qt-creator/qt-creator
Debugger: Remove DebuggerRunControl
Use plain RunControl + DebuggerRunTool combo instead. Change-Id: Ib71b5eab50da667b9d71dcc6689d2643ad8ecdee Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -61,7 +61,7 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl)
|
||||
connect(runner, &ApplicationLauncher::remoteStdout, this, &QnxDebugSupport::handleRemoteOutput);
|
||||
connect(runner, &ApplicationLauncher::remoteStderr, this, &QnxDebugSupport::handleRemoteOutput);
|
||||
|
||||
connect(this->runControl()->toolRunner(), &Debugger::DebuggerRunTool::requestRemoteSetup,
|
||||
connect(toolRunner(), &Debugger::DebuggerRunTool::requestRemoteSetup,
|
||||
this, &QnxDebugSupport::handleAdapterSetupRequested);
|
||||
connect(runControl, &RunControl::finished,
|
||||
this, &QnxDebugSupport::handleDebuggingFinished);
|
||||
@@ -82,7 +82,7 @@ void QnxDebugSupport::handleAdapterSetupRequested()
|
||||
{
|
||||
QTC_ASSERT(state() == Inactive, return);
|
||||
|
||||
runControl()->toolRunner()->showMessage(tr("Preparing remote side...") + '\n', Debugger::AppStuff);
|
||||
toolRunner()->showMessage(tr("Preparing remote side...") + '\n', Debugger::AppStuff);
|
||||
QnxAbstractRunSupport::handleAdapterSetupRequested();
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ void QnxDebugSupport::handleRemoteProcessStarted()
|
||||
result.success = true;
|
||||
result.gdbServerPort = m_pdebugPort;
|
||||
result.qmlServerPort = m_qmlPort;
|
||||
runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleRemoteProcessFinished(bool success)
|
||||
@@ -134,13 +134,13 @@ void QnxDebugSupport::handleRemoteProcessFinished(bool success)
|
||||
|
||||
if (state() == Running) {
|
||||
if (!success)
|
||||
runControl()->toolRunner()->notifyInferiorIll();
|
||||
toolRunner()->notifyInferiorIll();
|
||||
|
||||
} else {
|
||||
Debugger::RemoteSetupResult result;
|
||||
result.success = false;
|
||||
result.reason = tr("The %1 process closed unexpectedly.").arg(processExecutable());
|
||||
runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,44 +166,44 @@ void QnxDebugSupport::killInferiorProcess()
|
||||
|
||||
void QnxDebugSupport::handleProgressReport(const QString &progressOutput)
|
||||
{
|
||||
runControl()->toolRunner()->showMessage(progressOutput + QLatin1Char('\n'), Debugger::AppStuff);
|
||||
toolRunner()->showMessage(progressOutput + QLatin1Char('\n'), Debugger::AppStuff);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleRemoteOutput(const QByteArray &output)
|
||||
{
|
||||
QTC_ASSERT(state() == Inactive || state() == Running, return);
|
||||
runControl()->toolRunner()->showMessage(QString::fromUtf8(output), Debugger::AppOutput);
|
||||
toolRunner()->showMessage(QString::fromUtf8(output), Debugger::AppOutput);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleError(const QString &error)
|
||||
{
|
||||
if (state() == Running) {
|
||||
runControl()->toolRunner()->showMessage(error, Debugger::AppError);
|
||||
runControl()->toolRunner()->notifyInferiorIll();
|
||||
toolRunner()->showMessage(error, Debugger::AppError);
|
||||
toolRunner()->notifyInferiorIll();
|
||||
} else if (state() != Inactive) {
|
||||
setFinished();
|
||||
Debugger::RemoteSetupResult result;
|
||||
result.success = false;
|
||||
result.reason = tr("Initial setup failed: %1").arg(error);
|
||||
runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
toolRunner()->notifyEngineRemoteSetupFinished(result);
|
||||
}
|
||||
}
|
||||
|
||||
void QnxDebugSupport::printMissingWarning()
|
||||
{
|
||||
runControl()->toolRunner()->showMessage(tr("Warning: \"slog2info\" is not found "
|
||||
toolRunner()->showMessage(tr("Warning: \"slog2info\" is not found "
|
||||
"on the device, debug output not available."), Debugger::AppError);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleApplicationOutput(const QString &msg, Utils::OutputFormat outputFormat)
|
||||
{
|
||||
Q_UNUSED(outputFormat);
|
||||
runControl()->toolRunner()->showMessage(msg, Debugger::AppOutput);
|
||||
toolRunner()->showMessage(msg, Debugger::AppOutput);
|
||||
}
|
||||
|
||||
Debugger::DebuggerRunControl *QnxDebugSupport::runControl()
|
||||
Debugger::DebuggerRunTool *QnxDebugSupport::toolRunner()
|
||||
{
|
||||
return qobject_cast<Debugger::DebuggerRunControl *>(QnxAbstractRunSupport::runControl());
|
||||
return qobject_cast<Debugger::DebuggerRunTool *>(runControl()->toolRunner());
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user