CheckoutWizards: Simplify code to look up specific pages

Change-Id: I0098e17585d73e05632027676e7712ef9c843da2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2015-05-11 13:02:36 +02:00
parent 75f067550f
commit caca9dfa6f
5 changed files with 12 additions and 33 deletions

View File

@@ -66,13 +66,9 @@ VcsCommand *CheckoutWizard::createCommand(Utils::FileName *checkoutDir)
{
// Collect parameters for the checkout command.
// CVS does not allow for checking out into a different directory.
const CheckoutWizardPage *cwp = 0;
foreach (int pageId, pageIds()) {
if ((cwp = qobject_cast<const CheckoutWizardPage *>(page(pageId))))
break;
}
const CheckoutWizardPage *cwp = find<CheckoutWizardPage>();
QTC_ASSERT(cwp, return 0);
const CvsSettings settings = CvsPlugin::instance()->client()->settings();
const Utils::FileName binary = settings.binaryPath();
QStringList args;