VCS: Replace AbstractCheckoutJob with Command

Command now provides the same functionality. Deduplicate code.

Change-Id: I789f021050471281870b6ef6a81a94e66fbdf0c7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-08-28 21:27:47 +03:00
committed by Orgad Shaneh
parent 27e53f746f
commit aefd61478a
29 changed files with 158 additions and 435 deletions

View File

@@ -36,7 +36,6 @@
#include "../gitplugin.h"
#include <coreplugin/iversioncontrol.h>
#include <vcsbase/checkoutjobs.h>
#include <vcsbase/vcsbaseconstants.h>
#include <vcsbase/vcsconfigurationpage.h>
#include <utils/qtcassert.h>
@@ -109,11 +108,11 @@ QList<QWizardPage*> GitoriousCloneWizard::createParameterPages(const QString &pa
return rc;
}
QSharedPointer<VcsBase::AbstractCheckoutJob> GitoriousCloneWizard::createJob(const QList<QWizardPage*> &parameterPages,
QString *checkoutPath)
VcsBase::Command *GitoriousCloneWizard::createCommand(const QList<QWizardPage*> &parameterPages,
QString *checkoutPath)
{
const Git::CloneWizardPage *cwp = qobject_cast<const Git::CloneWizardPage *>(parameterPages.back());
QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>());
QTC_ASSERT(cwp, return 0);
return cwp->createCheckoutJob(checkoutPath);
}