summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/coreplugin/iversioncontrol.cpp12
-rw-r--r--src/plugins/coreplugin/iversioncontrol.h13
-rw-r--r--src/plugins/gitlab/gitlabclonedialog.cpp12
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp12
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.h11
-rw-r--r--src/plugins/vcsbase/wizard/vcscommandpage.cpp5
6 files changed, 34 insertions, 31 deletions
diff --git a/src/plugins/coreplugin/iversioncontrol.cpp b/src/plugins/coreplugin/iversioncontrol.cpp
index 2d06da8bc2..a47a184889 100644
--- a/src/plugins/coreplugin/iversioncontrol.cpp
+++ b/src/plugins/coreplugin/iversioncontrol.cpp
@@ -88,18 +88,6 @@ FilePaths IVersionControl::additionalToolsPath() const
return {};
}
-VcsBase::VcsCommand *IVersionControl::createInitialCheckoutCommand(const QString &url,
- const Utils::FilePath &baseDirectory,
- const QString &localName,
- const QStringList &extraArgs)
-{
- Q_UNUSED(url)
- Q_UNUSED(baseDirectory)
- Q_UNUSED(localName)
- Q_UNUSED(extraArgs)
- return nullptr;
-}
-
IVersionControl::RepoUrl::RepoUrl(const QString &location)
{
if (location.isEmpty())
diff --git a/src/plugins/coreplugin/iversioncontrol.h b/src/plugins/coreplugin/iversioncontrol.h
index baff3bc809..ef8536741e 100644
--- a/src/plugins/coreplugin/iversioncontrol.h
+++ b/src/plugins/coreplugin/iversioncontrol.h
@@ -38,8 +38,6 @@
QT_FORWARD_DECLARE_CLASS(QMenu);
-namespace VcsBase { class VcsCommand; }
-
namespace Core {
class CORE_EXPORT IVersionControl : public QObject
@@ -223,17 +221,6 @@ public:
*/
virtual Utils::FilePaths additionalToolsPath() const;
- /*!
- * Return a VcsCommand capable of checking out \a url into \a baseDirectory, where
- * a new subdirectory with \a localName will be created.
- *
- * \a extraArgs are passed on to the command being run.
- */
- virtual VcsBase::VcsCommand *createInitialCheckoutCommand(const QString &url,
- const Utils::FilePath &baseDirectory,
- const QString &localName,
- const QStringList &extraArgs);
-
virtual void fillLinkContextMenu(QMenu *menu,
const Utils::FilePath &workingDirectory,
const QString &reference);
diff --git a/src/plugins/gitlab/gitlabclonedialog.cpp b/src/plugins/gitlab/gitlabclonedialog.cpp
index b295ab8372..1f60003734 100644
--- a/src/plugins/gitlab/gitlabclonedialog.cpp
+++ b/src/plugins/gitlab/gitlabclonedialog.cpp
@@ -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();
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index ed461ef876..bdbaa73964 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -584,6 +584,18 @@ const VcsBasePluginState &VcsBasePluginPrivate::currentState() const
return m_state;
}
+VcsCommand *VcsBasePluginPrivate::createInitialCheckoutCommand(const QString &url,
+ const Utils::FilePath &baseDirectory,
+ const QString &localName,
+ const QStringList &extraArgs)
+{
+ Q_UNUSED(url)
+ Q_UNUSED(baseDirectory)
+ Q_UNUSED(localName)
+ Q_UNUSED(extraArgs)
+ return nullptr;
+}
+
bool VcsBasePluginPrivate::enableMenuAction(ActionState as, QAction *menuAction) const
{
qCDebug(baseLog) << "enableMenuAction" << menuAction->text() << as;
diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h
index b718e27acf..0f1fcb36b1 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.h
+++ b/src/plugins/vcsbase/vcsbaseplugin.h
@@ -54,6 +54,7 @@ namespace Internal { class State; }
class VcsBaseSubmitEditor;
class VcsBasePluginPrivate;
class VcsBasePluginStateData;
+class VcsCommand;
// Documentation inside.
class VCSBASE_EXPORT VcsBasePluginState
@@ -144,6 +145,16 @@ public:
const VcsBasePluginState &currentState() const;
+ /*!
+ * Return a VcsCommand capable of checking out \a url into \a baseDirectory, where
+ * a new subdirectory with \a localName will be created.
+ *
+ * \a extraArgs are passed on to the command being run.
+ */
+ virtual VcsCommand *createInitialCheckoutCommand(const QString &url,
+ const Utils::FilePath &baseDirectory,
+ const QString &localName,
+ const QStringList &extraArgs);
// Display name of the commit action
virtual QString commitDisplayName() const;
diff --git a/src/plugins/vcsbase/wizard/vcscommandpage.cpp b/src/plugins/vcsbase/wizard/vcscommandpage.cpp
index 717fb96385..80c8a10617 100644
--- a/src/plugins/vcsbase/wizard/vcscommandpage.cpp
+++ b/src/plugins/vcsbase/wizard/vcscommandpage.cpp
@@ -24,9 +24,9 @@
****************************************************************************/
#include "vcscommandpage.h"
+#include "vcsbaseplugin.h"
#include "vcscommand.h"
-#include <coreplugin/iversioncontrol.h>
#include <coreplugin/vcsmanager.h>
#include <projectexplorer/jsonwizard/jsonwizard.h>
@@ -354,7 +354,8 @@ void VcsCommandPage::delayedInitialize()
QTC_ASSERT(wiz, return);
const QString vcsId = wiz->expander()->expand(m_vcsId);
- IVersionControl *vc = VcsManager::versionControl(Id::fromString(vcsId));
+ VcsBasePluginPrivate *vc = static_cast<VcsBasePluginPrivate *>(
+ VcsManager::versionControl(Id::fromString(vcsId)));
if (!vc) {
qWarning() << QCoreApplication::translate("VcsBase::VcsCommandPage",
"\"%1\" (%2) not found.")