diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2014-05-05 16:48:02 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2014-05-26 11:44:16 +0200 |
commit | dae8df056720afa8af1d9cdee51d4e89421e20c6 (patch) | |
tree | b264a460678c789be0f31d78318be7742b538fa2 /src/plugins/cvs/checkoutwizard.cpp | |
parent | 6644a08c2167ca7c67db45b861fe7d7e21780342 (diff) | |
download | qt-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/cvs/checkoutwizard.cpp')
-rw-r--r-- | src/plugins/cvs/checkoutwizard.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cvs/checkoutwizard.cpp b/src/plugins/cvs/checkoutwizard.cpp index d80ce3653a..ffff5d2b4e 100644 --- a/src/plugins/cvs/checkoutwizard.cpp +++ b/src/plugins/cvs/checkoutwizard.cpp @@ -70,7 +70,11 @@ VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*> { // Collect parameters for the checkout command. // CVS does not allow for checking out into a different directory. - const CheckoutWizardPage *cwp = qobject_cast<const CheckoutWizardPage *>(parameterPages.front()); + const CheckoutWizardPage *cwp = 0; + foreach (QWizardPage *p, parameterPages) { + if ((cwp = qobject_cast<const CheckoutWizardPage *>(p))) + break; + } QTC_ASSERT(cwp, return 0); const CvsSettings settings = CvsPlugin::instance()->settings(); const QString binary = settings.binaryPath(); |