forked from qt-creator/qt-creator
VcsBase: Hide VcsCommand class
Make it an implementation detail. Introduce VcsBaseClient::createVcsCommand() method instead for instantiating VcsCommands. Replace all occuriences of VcsBase::VcsCommand in public API with Utils::ShellCommand. Change-Id: Ie438cc3a5e867b3ee8f9e935b56b2f16ea453f8a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -32,10 +32,9 @@
|
||||
|
||||
#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>
|
||||
@@ -195,8 +194,7 @@ void ChangeSelectionDialog::recalculateCompletion()
|
||||
return;
|
||||
|
||||
GitClient *client = GitClient::instance();
|
||||
VcsBase::VcsCommand *command = client->asyncForEachRefCmd(
|
||||
workingDir, {"--format=%(refname:short)"});
|
||||
ShellCommand *command = client->asyncForEachRefCmd(workingDir, {"--format=%(refname:short)"});
|
||||
connect(this, &QObject::destroyed, command, &ShellCommand::abort);
|
||||
connect(command, &ShellCommand::stdOutText, [this](const QString &output) {
|
||||
m_changeModel->setStringList(output.split('\n'));
|
||||
|
||||
Reference in New Issue
Block a user