forked from qt-creator/qt-creator
VcsCommand: Make runCommand() a static method
And rename it to runBlocking() in order to conform a bit more to QtcProcess API. In case of blocking run there is no need to instantiate VcsCommand on user side. This nicely draw a line between async usages (i.e. when start() is called and we need an instance) and blocking ones (i.e. when runBlocking() is called). Change-Id: I1ba94ee36c92956d5044236cb9e2dd896bf3cfcf Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -137,11 +137,8 @@ CommandResult VcsBaseClientImpl::vcsSynchronousExec(const FilePath &workingDir,
|
||||
CommandResult VcsBaseClientImpl::vcsSynchronousExec(const FilePath &workingDir,
|
||||
const CommandLine &cmdLine, unsigned flags, int timeoutS, QTextCodec *codec) const
|
||||
{
|
||||
VcsCommand command(workingDir, processEnvironment());
|
||||
command.addFlags(flags);
|
||||
if (codec)
|
||||
command.setCodec(codec);
|
||||
return command.runCommand(cmdLine, timeoutS > 0 ? timeoutS : vcsTimeoutS());
|
||||
return VcsCommand::runBlocking(workingDir, processEnvironment(), cmdLine, flags,
|
||||
timeoutS > 0 ? timeoutS : vcsTimeoutS(), codec);
|
||||
}
|
||||
|
||||
void VcsBaseClientImpl::resetCachedVcsInfo(const FilePath &workingDir)
|
||||
|
||||
Reference in New Issue
Block a user