Debugger: Centralize some parameter sanitization

Change-Id: I00e7c22adcf32ba8251b357e75eb9207b6f98f1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-05 15:32:25 +02:00
parent dce0b1c945
commit a512c8e0c8
7 changed files with 15 additions and 38 deletions

View File

@@ -1239,30 +1239,6 @@ QString DebuggerEngine::nativeStartupCommands() const
runParameters().additionalStartupCommands}).join('\n'));
}
bool DebuggerEngine::prepareCommand()
{
if (HostOsInfo::isWindowsHost()) {
DebuggerRunParameters &rp = runParameters();
QtcProcess::SplitError perr;
rp.inferior.commandLineArguments =
QtcProcess::prepareArgs(rp.inferior.commandLineArguments, &perr,
HostOsInfo::hostOs(), nullptr,
&rp.inferior.workingDirectory).toWindowsArgs();
if (perr != QtcProcess::SplitOk) {
// perr == BadQuoting is never returned on Windows
// FIXME? QTCREATORBUG-2809
showMessage("ADAPTER START FAILED");
const QString title = tr("Adapter start failed");
const QString msg = tr("Debugging complex command lines "
"is currently not supported on Windows.");
ICore::showWarningWithOptions(title, msg);
notifyEngineSetupFailed();
return false;
}
}
return true;
}
void DebuggerEngine::updateBreakpointMarker(const Breakpoint &bp)
{
d->m_disassemblerAgent.updateBreakpointMarker(bp);