forked from qt-creator/qt-creator
Vcs: Use QtcProcess
Change-Id: I5fb19144b17b817a783fcf927f3a74dbdaaa97ab Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user