aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitgrep.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2022-08-01 10:49:13 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2022-08-01 14:33:06 +0000
commit60302debd7f571d63c52bf75a1279dca14575869 (patch)
tree42053e0ead614d5ca395e29358fa633763650efe /src/plugins/git/gitgrep.cpp
parent61adea0cfdd68e95970c976aebbd39f773300300 (diff)
Move ShellCommand into VcsBase plugin
Rename it to VcsCommand. Move also ShellCommandPage into VcsBase plugin. Change-Id: I335ac47e3090f2be497643ebcda0eaad2987ac81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gitgrep.cpp')
-rw-r--r--src/plugins/git/gitgrep.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index 7bf8c8dfebf..541fd4e132c 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -29,8 +29,11 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/vcsmanager.h>
+
#include <texteditor/findinfiles.h>
+
#include <vcsbase/vcsbaseconstants.h>
+#include <vcsbase/vcscommand.h>
#include <utils/algorithm.h>
#include <utils/commandline.h>
@@ -39,7 +42,6 @@
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
-#include <utils/shellcommand.h>
#include <utils/textfileformat.h>
#include <QCheckBox>
@@ -64,6 +66,7 @@ public:
using namespace Core;
using namespace Utils;
+using namespace VcsBase;
namespace {
@@ -187,16 +190,16 @@ public:
return QString(":!" + filter);
});
arguments << "--" << filterArgs << exclusionArgs;
- m_command->addFlags(ShellCommand::SilentOutput | ShellCommand::SuppressFailMessage);
+ m_command->addFlags(VcsCommand::SilentOutput | VcsCommand::SuppressFailMessage);
m_command->setProgressiveOutput(true);
QFutureWatcher<FileSearchResultList> watcher;
QObject::connect(&watcher,
&QFutureWatcher<FileSearchResultList>::canceled,
m_command.get(),
- &ShellCommand::cancel);
+ &VcsCommand::cancel);
watcher.setFuture(fi.future());
QObject::connect(m_command.get(),
- &ShellCommand::stdOutText,
+ &VcsCommand::stdOutText,
[this, &fi](const QString &text) { read(fi, text); });
const CommandResult result = m_command->runCommand({m_vcsBinary, arguments}, {}, 0);
switch (result.result()) {
@@ -218,7 +221,7 @@ private:
FilePath m_directory;
QString m_ref;
TextEditor::FileFindParameters m_parameters;
- std::unique_ptr<ShellCommand> m_command;
+ std::unique_ptr<VcsCommand> m_command;
};
} // namespace