summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitclient.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2022-08-03 13:07:23 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2022-08-03 11:30:36 +0000
commit7bd33bc247d3bc07a4e56c5ea4967dda9fbbb0ac (patch)
tree6c924739bbbf7b3940063777d610c566215953dc /src/plugins/git/gitclient.cpp
parenta5683616b938deffa290f95aaa7f747c239360d7 (diff)
downloadqt-creator-7bd33bc247d3bc07a4e56c5ea4967dda9fbbb0ac.tar.gz
VcsCommand: Remove defaultWorkingRepository() getter
It wasn't really broadly used. Change-Id: If2e185a7d8d0f920f3ec7f507bf96dd81f4559b0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r--src/plugins/git/gitclient.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index de1075e714..9342ce560e 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -740,8 +740,9 @@ class ConflictHandler final : public QObject
{
Q_OBJECT
public:
- static void attachToCommand(VcsCommand *command, const QString &abortCommand = QString()) {
- auto handler = new ConflictHandler(command->defaultWorkingDirectory(), abortCommand);
+ static void attachToCommand(VcsCommand *command, const FilePath &workingDirectory,
+ const QString &abortCommand = {}) {
+ auto handler = new ConflictHandler(workingDirectory, abortCommand);
handler->setParent(command); // delete when command goes out of scope
command->addFlags(VcsCommand::ExpectRepoChanges);
@@ -3437,7 +3438,7 @@ VcsCommand *GitClient::vcsExecAbortable(const FilePath &workingDirectory,
// For rebase, Git might request an editor (which means the process keeps running until the
// user closes it), so run without timeout.
command->addJob({vcsBinary(), arguments}, isRebase ? 0 : vcsTimeoutS());
- ConflictHandler::attachToCommand(command, abortCommand);
+ ConflictHandler::attachToCommand(command, workingDirectory, abortCommand);
if (isRebase)
GitProgressParser::attachToCommand(command);
command->execute();
@@ -3500,7 +3501,7 @@ void GitClient::stashPop(const FilePath &workingDirectory, const QString &stash)
arguments << stash;
VcsCommand *cmd = vcsExec(workingDirectory, arguments, nullptr, true,
VcsCommand::ExpectRepoChanges);
- ConflictHandler::attachToCommand(cmd);
+ ConflictHandler::attachToCommand(cmd, workingDirectory);
}
bool GitClient::synchronousStashRestore(const FilePath &workingDirectory,