forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -32,9 +32,10 @@
|
||||
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/shellcommand.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
#include <vcsbase/vcscommand.h>
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
@@ -48,6 +49,7 @@
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Utils;
|
||||
using namespace VcsBase;
|
||||
|
||||
namespace Git {
|
||||
namespace Internal {
|
||||
@@ -194,9 +196,9 @@ void ChangeSelectionDialog::recalculateCompletion()
|
||||
return;
|
||||
|
||||
GitClient *client = GitClient::instance();
|
||||
ShellCommand *command = client->asyncForEachRefCmd(workingDir, {"--format=%(refname:short)"});
|
||||
connect(this, &QObject::destroyed, command, &ShellCommand::abort);
|
||||
connect(command, &ShellCommand::stdOutText, [this](const QString &output) {
|
||||
VcsCommand *command = client->asyncForEachRefCmd(workingDir, {"--format=%(refname:short)"});
|
||||
connect(this, &QObject::destroyed, command, &VcsCommand::abort);
|
||||
connect(command, &VcsCommand::stdOutText, [this](const QString &output) {
|
||||
m_changeModel->setStringList(output.split('\n'));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user