Debugger: Remove serverStartScript run parameter

Instead, create the resulting RunWorker as dependency directly.

Change-Id: Id15005bb5707bb97dfc61cc2f84409e759e60f9f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2017-09-12 13:50:45 +02:00
parent ace413a74c
commit 62ada96091
4 changed files with 9 additions and 12 deletions

View File

@@ -433,9 +433,9 @@ void StartApplicationDialog::run(bool attachRemote)
debugger->setRemoteChannel(dev->sshParameters().host, newParameters.serverPort); debugger->setRemoteChannel(dev->sshParameters().host, newParameters.serverPort);
debugger->setRunControlName(newParameters.displayName()); debugger->setRunControlName(newParameters.displayName());
debugger->setBreakOnMain(newParameters.breakAtMain); debugger->setBreakOnMain(newParameters.breakAtMain);
debugger->setServerStartScript(newParameters.serverStartScript);
debugger->setDebugInfoLocation(newParameters.debugInfoLocation); debugger->setDebugInfoLocation(newParameters.debugInfoLocation);
debugger->setInferior(inferior); debugger->setInferior(inferior);
debugger->setServerStartScript(newParameters.serverStartScript); // Note: This requires inferior.
debugger->setNeedFixup(false); debugger->setNeedFixup(false);
bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);

View File

@@ -108,7 +108,6 @@ QDebug operator<<(QDebug str, const DebuggerRunParameters &sp)
<< " attachPID=" << sp.attachPID.pid() << " attachPID=" << sp.attachPID.pid()
<< " useTerminal=" << sp.useTerminal << " useTerminal=" << sp.useTerminal
<< " remoteChannel=" << sp.remoteChannel << " remoteChannel=" << sp.remoteChannel
<< " serverStartScript=" << sp.serverStartScript
<< " abi=" << sp.toolChainAbi.toString() << '\n'; << " abi=" << sp.toolChainAbi.toString() << '\n';
return str; return str;
} }

View File

@@ -141,7 +141,6 @@ public:
QString startMessage; // First status message shown. QString startMessage; // First status message shown.
QString debugInfoLocation; // Gdb "set-debug-file-directory". QString debugInfoLocation; // Gdb "set-debug-file-directory".
QStringList debugSourceLocation; // Gdb "directory" QStringList debugSourceLocation; // Gdb "directory"
QString serverStartScript;
bool isSnapshot = false; // Set if created internally. bool isSnapshot = false; // Set if created internally.
ProjectExplorer::Abi toolChainAbi; ProjectExplorer::Abi toolChainAbi;

View File

@@ -279,7 +279,14 @@ void DebuggerRunTool::setCommandsForReset(const QString &commands)
void DebuggerRunTool::setServerStartScript(const QString &serverStartScript) void DebuggerRunTool::setServerStartScript(const QString &serverStartScript)
{ {
m_runParameters.serverStartScript = serverStartScript; if (!serverStartScript.isEmpty()) {
// Provide script information about the environment
StandardRunnable serverStarter;
serverStarter.executable = serverStartScript;
QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.inferior.executable);
QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.remoteChannel);
addStartDependency(new LocalProcessRunner(runControl(), serverStarter));
}
} }
void DebuggerRunTool::setDebugInfoLocation(const QString &debugInfoLocation) void DebuggerRunTool::setDebugInfoLocation(const QString &debugInfoLocation)
@@ -852,14 +859,6 @@ void DebuggerRunTool::setRunParameters(const DebuggerRunParameters &rp)
{ {
m_runParameters = rp; m_runParameters = rp;
if (!rp.serverStartScript.isEmpty()) {
// Provide script information about the environment
StandardRunnable serverStarter;
serverStarter.executable = rp.serverStartScript;
QtcProcess::addArg(&serverStarter.commandLineArguments, rp.inferior.executable);
QtcProcess::addArg(&serverStarter.commandLineArguments, rp.remoteChannel);
addStartDependency(new LocalProcessRunner(runControl(), serverStarter));
}
} }
DebuggerEngine *DebuggerRunTool::activeEngine() const DebuggerEngine *DebuggerRunTool::activeEngine() const