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:
@@ -39,6 +39,8 @@
|
||||
#include <vcsbase/vcsbaseconstants.h>
|
||||
#include <vcsbase/wizard/vcsconfigurationpage.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace VcsBase;
|
||||
|
||||
namespace Mercurial {
|
||||
@@ -66,14 +68,8 @@ CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
|
||||
|
||||
VcsCommand *CloneWizard::createCommand(Utils::FileName *checkoutDir)
|
||||
{
|
||||
const CloneWizardPage *cwp = 0;
|
||||
foreach (int pageId, pageIds()) {
|
||||
if ((cwp = qobject_cast<const CloneWizardPage *>(page(pageId))))
|
||||
break;
|
||||
}
|
||||
|
||||
if (!cwp)
|
||||
return 0;
|
||||
const CloneWizardPage *cwp = find<CloneWizardPage>();
|
||||
QTC_ASSERT(cwp, return 0);
|
||||
|
||||
const VcsBaseClientSettings &settings = MercurialPlugin::client()->settings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user