summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitorious/gitoriousclonewizard.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2014-05-05 16:48:02 +0200
committerTobias Hunger <tobias.hunger@digia.com>2014-05-26 11:44:16 +0200
commitdae8df056720afa8af1d9cdee51d4e89421e20c6 (patch)
treeb264a460678c789be0f31d78318be7742b538fa2 /src/plugins/git/gitorious/gitoriousclonewizard.cpp
parent6644a08c2167ca7c67db45b861fe7d7e21780342 (diff)
downloadqt-creator-dae8df056720afa8af1d9cdee51d4e89421e20c6.tar.gz
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>
Diffstat (limited to 'src/plugins/git/gitorious/gitoriousclonewizard.cpp')
-rw-r--r--src/plugins/git/gitorious/gitoriousclonewizard.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/git/gitorious/gitoriousclonewizard.cpp b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
index 36b0f2a5b5..e66cdd6a0d 100644
--- a/src/plugins/git/gitorious/gitoriousclonewizard.cpp
+++ b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
@@ -102,7 +102,11 @@ QList<QWizardPage*> GitoriousCloneWizardFactory::createParameterPages(const QStr
VcsBase::Command *GitoriousCloneWizardFactory::createCommand(const QList<QWizardPage*> &parameterPages,
QString *checkoutPath)
{
- const Git::CloneWizardPage *cwp = qobject_cast<const Git::CloneWizardPage *>(parameterPages.back());
+ const Git::CloneWizardPage *cwp = 0;
+ foreach (QWizardPage *p, parameterPages) {
+ if ((cwp = qobject_cast<const Git::CloneWizardPage *>(p)))
+ break;
+ }
QTC_ASSERT(cwp, return 0);
return cwp->createCheckoutJob(checkoutPath);
}