diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-02-25 20:20:25 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2020-02-26 10:29:27 +0000 |
commit | 7c4f0a9b1ed29e9440211e37e45d0e3451ac2a62 (patch) | |
tree | b37f939747b7450136552a55d9930823b8659a8b /src/plugins/git/gitgrep.cpp | |
parent | 5765bd8507b1e76ef61176435ce357962fb9b291 (diff) |
Git: Store singleton instance in GitClient
On many cases, GitPlugin is not required at all, and is only used as
a proxy for GitClient.
Change-Id: I246012658ab3e8c7a12f1a459b1b1748ff358e0b
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/git/gitgrep.cpp')
-rw-r--r-- | src/plugins/git/gitgrep.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp index 66e249fbf70..c413c6c2311 100644 --- a/src/plugins/git/gitgrep.cpp +++ b/src/plugins/git/gitgrep.cpp @@ -26,7 +26,6 @@ #include "gitgrep.h" #include "gitclient.h" #include "gitconstants.h" -#include "gitplugin.h" #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/progressmanager/progressmanager.h> @@ -187,7 +186,7 @@ public: return QString(":!" + filter); }); arguments << "--" << filterArgs << exclusionArgs; - QScopedPointer<VcsCommand> command(GitPlugin::client()->createCommand(m_directory)); + QScopedPointer<VcsCommand> command(GitClient::instance()->createCommand(m_directory)); command->addFlags(VcsCommand::SilentOutput | VcsCommand::SuppressFailMessage); command->setProgressiveOutput(true); QFutureWatcher<FileSearchResultList> watcher; @@ -195,7 +194,7 @@ public: connect(&watcher, &QFutureWatcher<FileSearchResultList>::canceled, command.data(), &VcsCommand::cancel); connect(command.data(), &VcsCommand::stdOutText, this, &GitGrepRunner::read); - SynchronousProcessResponse resp = command->runCommand({GitPlugin::client()->vcsBinary(), arguments}, 0); + SynchronousProcessResponse resp = command->runCommand({GitClient::instance()->vcsBinary(), arguments}, 0); switch (resp.result) { case SynchronousProcessResponse::TerminatedAbnormally: case SynchronousProcessResponse::StartFailed: |