From e4aa2b581e57b7a4eefea6f6ee74176147cf7f9f Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Tue, 13 Mar 2012 11:28:01 +0100 Subject: [PATCH] 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> --- src/plugins/git/clonewizard.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/git/clonewizard.cpp b/src/plugins/git/clonewizard.cpp index 46441dff47f..c8923d2f8dd 100644 --- a/src/plugins/git/clonewizard.cpp +++ b/src/plugins/git/clonewizard.cpp @@ -83,8 +83,14 @@ QSharedPointer<VcsBase::AbstractCheckoutJob> CloneWizard::createJob(const QList< QString *checkoutPath) { // Collect parameters for the clone command. - const CloneWizardPage *cwp = qobject_cast<const CloneWizardPage *>(parameterPages.front()); - QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>()) + const CloneWizardPage *cwp = 0; + foreach (QWizardPage *wp, parameterPages) { + cwp = qobject_cast<const CloneWizardPage *>(wp); + if (cwp) + break; + } + + QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>()); return cwp->createCheckoutJob(checkoutPath); } -- GitLab