forked from qt-creator/qt-creator
CheckoutWizards: Simplify code to look up specific pages
Change-Id: I0098e17585d73e05632027676e7712ef9c843da2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -67,11 +67,7 @@ CheckoutWizard::CheckoutWizard(const FileName &path, QWidget *parent) :
|
||||
VcsCommand *CheckoutWizard::createCommand(FileName *checkoutDir)
|
||||
{
|
||||
// Collect parameters for the checkout command.
|
||||
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);
|
||||
|
||||
SubversionClient *client = SubversionPlugin::instance()->client();
|
||||
|
||||
Reference in New Issue
Block a user