forked from qt-creator/qt-creator
BaseCheckoutWizard*: Move createCommand from factory into Wizard
Change-Id: I0dcc931f279b59f0d6cf7afb553a2fed30baae7a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -53,20 +53,6 @@ VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWi
|
||||
return new CloneWizard(path, parent);
|
||||
}
|
||||
|
||||
VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||
QString *checkoutPath)
|
||||
{
|
||||
// Collect parameters for the clone command.
|
||||
const CloneWizardPage *cwp = 0;
|
||||
foreach (QWizardPage *wp, parameterPages) {
|
||||
if ((cwp = qobject_cast<const CloneWizardPage *>(wp)))
|
||||
break;
|
||||
}
|
||||
|
||||
QTC_ASSERT(cwp, return 0);
|
||||
return cwp->createCheckoutJob(checkoutPath);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// CloneWizard:
|
||||
// --------------------------------------------------------------------
|
||||
@@ -85,5 +71,18 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
|
||||
addPage(cwp);
|
||||
}
|
||||
|
||||
VcsBase::Command *CloneWizard::createCommand(QString *checkoutDir)
|
||||
{
|
||||
// Collect parameters for the clone command.
|
||||
const CloneWizardPage *cwp = 0;
|
||||
foreach (int pageId, pageIds()) {
|
||||
if ((cwp = qobject_cast<const CloneWizardPage *>(page(pageId))))
|
||||
break;
|
||||
}
|
||||
|
||||
QTC_ASSERT(cwp, return 0);
|
||||
return cwp->createCheckoutJob(checkoutDir);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Git
|
||||
|
||||
Reference in New Issue
Block a user