forked from qt-creator/qt-creator
Move createInitialCheckoutCommand() out from core plugin
Change-Id: I99f4795822838ac084d0d6823db96e5864e0dcdf Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <vcsbase/vcsbaseplugin.h>
|
||||
#include <vcsbase/vcscommand.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -61,6 +62,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
using namespace VcsBase;
|
||||
|
||||
namespace GitLab {
|
||||
|
||||
GitLabCloneDialog::GitLabCloneDialog(const Project &project, QWidget *parent)
|
||||
@@ -147,7 +150,8 @@ void GitLabCloneDialog::updateUi()
|
||||
|
||||
void GitLabCloneDialog::cloneProject()
|
||||
{
|
||||
Core::IVersionControl *vc = Core::VcsManager::versionControl(Utils::Id::fromString("G.Git"));
|
||||
VcsBasePluginPrivate *vc = static_cast<VcsBasePluginPrivate *>(
|
||||
Core::VcsManager::versionControl(Utils::Id::fromString("G.Git")));
|
||||
QTC_ASSERT(vc, return);
|
||||
const QStringList extraArgs = m_submodulesCB->isChecked() ? QStringList{ "--recursive" }
|
||||
: QStringList{};
|
||||
@@ -156,13 +160,13 @@ void GitLabCloneDialog::cloneProject()
|
||||
m_directoryLE->text(), extraArgs);
|
||||
const Utils::FilePath workingDirectory = m_pathChooser->absoluteFilePath();
|
||||
m_command->setProgressiveOutput(true);
|
||||
connect(m_command, &VcsBase::VcsCommand::stdOutText, this, [this](const QString &text) {
|
||||
connect(m_command, &VcsCommand::stdOutText, this, [this](const QString &text) {
|
||||
m_cloneOutput->appendPlainText(text);
|
||||
});
|
||||
connect(m_command, &VcsBase::VcsCommand::stdErrText, this, [this](const QString &text) {
|
||||
connect(m_command, &VcsCommand::stdErrText, this, [this](const QString &text) {
|
||||
m_cloneOutput->appendPlainText(text);
|
||||
});
|
||||
connect(m_command, &VcsBase::VcsCommand::finished, this, &GitLabCloneDialog::cloneFinished);
|
||||
connect(m_command, &VcsCommand::finished, this, &GitLabCloneDialog::cloneFinished);
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
||||
m_cloneOutput->clear();
|
||||
|
||||
Reference in New Issue
Block a user