summaryrefslogtreecommitdiff
path: root/src/plugins/cvs/checkoutwizard.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-29 16:46:45 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-05-11 13:22:49 +0000
commit94dc35694a3374ef785a6765730dfc1d9401075f (patch)
treeb768a67347f96f6eb3972da56e885e95bd7c8ea6 /src/plugins/cvs/checkoutwizard.cpp
parentf21d2023e86e8ba9c0725852a79394ec80baaf16 (diff)
downloadqt-creator-94dc35694a3374ef785a6765730dfc1d9401075f.tar.gz
CheckoutWizards: Use IVersionControl::createInitialCheckoutCommand
Change-Id: I09dd38f66b9cad46d561493c2e27a833595d8728 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs/checkoutwizard.cpp')
-rw-r--r--src/plugins/cvs/checkoutwizard.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/plugins/cvs/checkoutwizard.cpp b/src/plugins/cvs/checkoutwizard.cpp
index 334cd415c2..b731f87891 100644
--- a/src/plugins/cvs/checkoutwizard.cpp
+++ b/src/plugins/cvs/checkoutwizard.cpp
@@ -49,14 +49,8 @@ namespace Internal {
// --------------------------------------------------------------------
CheckoutWizard::CheckoutWizard(const Utils::FileName &path, QWidget *parent) :
- BaseCheckoutWizard(path, parent)
+ BaseCheckoutWizard(Constants::VCS_ID_CVS, parent)
{
- const Core::IVersionControl *vc = CvsPlugin::instance()->versionControl();
- if (!vc->isConfigured()) {
- auto configPage = new VcsConfigurationPage;
- configPage->setVersionControl(vc);
- addPage(configPage);
- }
auto cwp = new CheckoutWizardPage;
cwp->setPath(path.toString());
addPage(cwp);
@@ -69,22 +63,14 @@ VcsCommand *CheckoutWizard::createCommand(Utils::FileName *checkoutDir)
const CheckoutWizardPage *cwp = find<CheckoutWizardPage>();
QTC_ASSERT(cwp, return 0);
- const CvsSettings settings = CvsPlugin::instance()->client()->settings();
- const Utils::FileName binary = settings.binaryPath();
- QStringList args;
+ *checkoutDir = Utils::FileName::fromString(cwp->path() + QLatin1Char('/') + cwp->repository());
// cwp->repository() contains the CVS module to check out only.
// The CVSROOT (== actual repository) for that module is part of the CVS settings.
// The checkout will always go into a new subfolder named after the CVS module.
- const QString repository = cwp->repository();
- args << QLatin1String("checkout") << repository;
- const QString workingDirectory = cwp->path();
- *checkoutDir = Utils::FileName::fromString(workingDirectory + QLatin1Char('/') + repository);
-
- auto command = new VcsCommand(workingDirectory, QProcessEnvironment::systemEnvironment());
- command->addJob(binary, settings.addOptions(args), -1);
- return command;
+ return createCommandImpl(cwp->repository(), Utils::FileName::fromString(cwp->path()),
+ cwp->repository(), QStringList());
}
} // namespace Internal