Vcs: Add method to create a Wizard to the WizardFactory and use it

Implement it in all VCS that support this type of wizard

Change-Id: I78b0e4a37e6bf6b25d8cee4b1e96bcc76188047a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2014-05-05 16:17:21 +02:00
parent 67c2c77a99
commit e9526eadb8
15 changed files with 152 additions and 9 deletions

View File

@@ -78,6 +78,7 @@ public:
void BaseCheckoutWizardFactoryPrivate::clear()
{
parameterPages.clear();
delete wizard;
wizard = 0;
checkoutPath.clear();
}
@@ -107,15 +108,15 @@ void BaseCheckoutWizardFactory::runWizard(const QString &path, QWidget *parent,
// Create dialog and launch
d->parameterPages = createParameterPages(path);
BaseCheckoutWizard wizard(d->parameterPages, parent);
BaseCheckoutWizard *wizard = create(d->parameterPages, parent);
if (!d->progressTitle.isEmpty())
wizard.setTitle(d->progressTitle);
wizard->setTitle(d->progressTitle);
if (!d->startedStatus.isEmpty())
wizard.setStartedStatus(d->startedStatus);
d->wizard = &wizard;
connect(&wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
wizard.setWindowTitle(displayName());
if (wizard.exec() != QDialog::Accepted)
wizard->setStartedStatus(d->startedStatus);
d->wizard = wizard;
connect(wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
wizard->setWindowTitle(displayName());
if (wizard->exec() != QDialog::Accepted)
return;
// Now try to find the project file and open
const QString checkoutPath = d->checkoutPath;