forked from qt-creator/qt-creator
Utils: Make process results accessible through QtcProcess object
The result is fully stored in the object anyway. Using the extra SynchronousProcessResponse structure only causes copies of the data and complicates access on the user side in a lot of cases. The result bits are now also accessible individually. There's obvious room for follow-up changes on the topic, e.g. ShellCommand::runCommand's parameter list could shrink to just a SynchronousProcess parameter. Change-Id: I45aa7eb23832340be06905929280c012e1217263 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -752,21 +752,6 @@ void setProcessEnvironment(Environment *e, bool forceCLocale, const QString &ssh
|
||||
e->set("SSH_ASKPASS", sshPromptBinary);
|
||||
}
|
||||
|
||||
// Run a process synchronously, returning Utils::SynchronousProcessResponse
|
||||
// response struct and using the VcsBasePlugin flags as applicable
|
||||
SynchronousProcessResponse runVcs(const QString &workingDir,
|
||||
const CommandLine &cmd,
|
||||
int timeOutS,
|
||||
unsigned flags,
|
||||
QTextCodec *outputCodec,
|
||||
const Environment &env)
|
||||
{
|
||||
VcsCommand command(workingDir, env.size() == 0 ? Environment::systemEnvironment() : env);
|
||||
command.addFlags(flags);
|
||||
command.setCodec(outputCodec);
|
||||
return command.runCommand(cmd, timeOutS);
|
||||
}
|
||||
|
||||
} // namespace VcsBase
|
||||
|
||||
#include "vcsbaseplugin.moc"
|
||||
|
||||
Reference in New Issue
Block a user