diff options
author | Artem Sokolovskii <[email protected]> | 2021-08-25 13:44:16 +0200 |
---|---|---|
committer | Artem Sokolovskii <[email protected]> | 2021-08-25 12:28:39 +0000 |
commit | 48b4af21aad6fd51580be37bee05b9b3b15bdf33 (patch) | |
tree | dc14f629dd7b37e4172ca86e062ec26e65cfa3bf /src/plugins/git/gitclient.cpp | |
parent | 244e940c94bd0397c426d312ee0f721c071aa6e9 (diff) |
Vcs: Use QtcProcess
Change-Id: I5fb19144b17b817a783fcf927f3a74dbdaaa97ab
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r-- | src/plugins/git/gitclient.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 290c3603374..10d02bdf500 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -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) |