Git: Do not fail to create checkout job

Do not fail to create checkout job when showing the configuration page.

Task-number: QTCREATORBUG-7082
Change-Id: I501cf9421f63b9ca4fa88f0d274624ff48117ced
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
Tobias Hunger
2012-03-13 11:28:01 +01:00
parent ebaecead49
commit e4aa2b581e

View File

@@ -83,8 +83,14 @@ QSharedPointer<VcsBase::AbstractCheckoutJob> CloneWizard::createJob(const QList<
QString *checkoutPath) QString *checkoutPath)
{ {
// Collect parameters for the clone command. // Collect parameters for the clone command.
const CloneWizardPage *cwp = qobject_cast<const CloneWizardPage *>(parameterPages.front()); const CloneWizardPage *cwp = 0;
QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>()) foreach (QWizardPage *wp, parameterPages) {
cwp = qobject_cast<const CloneWizardPage *>(wp);
if (cwp)
break;
}
QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>());
return cwp->createCheckoutJob(checkoutPath); return cwp->createCheckoutJob(checkoutPath);
} }