Vcs: Make checkout wizards work, even when VCS in unconfigured

They used to grab the first page in the set of pages and that
is the VCS setup page if the VCS was not configured before the
wizard was started. Then the wizards just stopped.

Change-Id: I8ea5bc373c07fb5c68a4814396864de6b8413747
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2014-05-05 16:48:02 +02:00
parent 6644a08c21
commit dae8df0567
6 changed files with 26 additions and 7 deletions

View File

@@ -68,7 +68,11 @@ QList<QWizardPage *> CloneWizardFactory::createParameterPages(const QString &pat
Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> &parameterPages,
QString *checkoutPath)
{
const CloneWizardPage *page = qobject_cast<const CloneWizardPage *>(parameterPages.front());
const CloneWizardPage *page = 0;
foreach (QWizardPage *p, parameterPages) {
if ((page = qobject_cast<const CloneWizardPage *>(p)))
break;
}
if (!page)
return 0;