Vcs: Use QtcProcess

Change-Id: I5fb19144b17b817a783fcf927f3a74dbdaaa97ab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Artem Sokolovskii
2021-08-25 13:44:16 +02:00
parent 244e940c94
commit 48b4af21aa
2 changed files with 6 additions and 7 deletions

View File

@@ -2344,7 +2344,7 @@ void ClearCasePluginPrivate::diffGraphical(const QString &file1, const QString &
args << file1;
if (!pred)
args << file2;
QProcess::startDetached(m_settings.ccBinaryPath, args, m_topLevel.toString());
QtcProcess::startDetached({FilePath::fromString(m_settings.ccBinaryPath), args}, m_topLevel);
}
QString ClearCasePluginPrivate::runExtDiff(const FilePath &workingDir, const QStringList &arguments,

View File

@@ -2587,7 +2587,7 @@ bool GitClient::tryLauchingGitK(const Environment &env,
if (!fileName.isEmpty())
arguments << "--" << fileName;
VcsOutputWindow::appendCommand(workingDirectory, {binary, arguments});
// This should always use QProcess::startDetached (as not to kill
// This should always use QtcProcess::startDetached (as not to kill
// the child), but that does not have an environment parameter.
bool success = false;
if (!settings().path.value().isEmpty()) {
@@ -2614,8 +2614,7 @@ bool GitClient::launchGitGui(const FilePath &workingDirectory) {
if (gitBinary.isEmpty()) {
success = false;
} else {
success = QProcess::startDetached(gitBinary.toString(), {"gui"},
workingDirectory.toString());
success = QtcProcess::startDetached({gitBinary, {"gui"}}, workingDirectory);
}
if (!success)
@@ -2654,13 +2653,13 @@ FilePath GitClient::gitBinDirectory() const
bool GitClient::launchGitBash(const FilePath &workingDirectory)
{
bool success = true;
const QString git = vcsBinary().toString();
const FilePath git = vcsBinary();
if (git.isEmpty()) {
success = false;
} else {
const QString gitBash = QFileInfo(git).absolutePath() + "/../git-bash.exe";
success = QProcess::startDetached(gitBash, {}, workingDirectory.toString());
const FilePath gitBash = git.absolutePath().parentDir() / "git-bash.exe";
success = QtcProcess::startDetached({gitBash, {}}, workingDirectory);
}
if (!success)