forked from qt-creator/qt-creator
Vcs: Remove propertyPages from wizardFactory
Change-Id: If9d3249818b024a1a873fd3f78190379c050ac66 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -51,21 +51,9 @@ CloneWizardFactory::CloneWizardFactory()
|
|||||||
setDisplayName(tr("Bazaar Clone (Or Branch)"));
|
setDisplayName(tr("Bazaar Clone (Or Branch)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
return new CloneWizard(parameterPages, parent);
|
return new CloneWizard(path, parent);
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWizardPage *> CloneWizardFactory::createParameterPages(const QString &path)
|
|
||||||
{
|
|
||||||
QList<QWizardPage *> wizardPageList;
|
|
||||||
const Core::IVersionControl *vc = BazaarPlugin::instance()->versionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
wizardPageList.append(new VcsBase::VcsConfigurationPage(vc));
|
|
||||||
CloneWizardPage *page = new CloneWizardPage;
|
|
||||||
page->setPath(path);
|
|
||||||
wizardPageList.append(page);
|
|
||||||
return wizardPageList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> ¶meterPages,
|
VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> ¶meterPages,
|
||||||
@@ -116,9 +104,16 @@ VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> &
|
|||||||
// CloneWizard:
|
// CloneWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
CloneWizard::CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{
|
{
|
||||||
setTitle(tr("Cloning"));
|
setTitle(tr("Cloning"));
|
||||||
setStartedStatus(tr("Cloning started..."));
|
setStartedStatus(tr("Cloning started..."));
|
||||||
|
|
||||||
|
const Core::IVersionControl *vc = BazaarPlugin::instance()->versionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsBase::VcsConfigurationPage(vc));
|
||||||
|
CloneWizardPage *page = new CloneWizardPage;
|
||||||
|
page->setPath(path);
|
||||||
|
addPage(page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,9 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
CloneWizardFactory();
|
CloneWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<QWizardPage *> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
VcsBase::Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
};
|
};
|
||||||
@@ -58,7 +57,7 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
CloneWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -48,21 +48,9 @@ CheckoutWizardFactory::CheckoutWizardFactory()
|
|||||||
setDisplayName(tr("CVS Checkout"));
|
setDisplayName(tr("CVS Checkout"));
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
return new CheckoutWizard(parameterPages, parent);
|
return new CheckoutWizard(path, parent);
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWizardPage*> CheckoutWizardFactory::createParameterPages(const QString &path)
|
|
||||||
{
|
|
||||||
QList<QWizardPage*> rc;
|
|
||||||
const Core::IVersionControl *vc = CvsPlugin::instance()->versionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
rc.append(new VcsBase::VcsConfigurationPage(vc));
|
|
||||||
CheckoutWizardPage *cwp = new CheckoutWizardPage;
|
|
||||||
cwp->setPath(path);
|
|
||||||
rc.push_back(cwp);
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
@@ -94,9 +82,16 @@ VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*>
|
|||||||
// CheckoutWizard:
|
// CheckoutWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
CheckoutWizard::CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
CheckoutWizard::CheckoutWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{ }
|
{
|
||||||
|
const Core::IVersionControl *vc = CvsPlugin::instance()->versionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsBase::VcsConfigurationPage(vc));
|
||||||
|
CheckoutWizardPage *cwp = new CheckoutWizardPage;
|
||||||
|
cwp->setPath(path);
|
||||||
|
addPage(cwp);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Cvs
|
} // namespace Cvs
|
||||||
|
|||||||
@@ -43,11 +43,10 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
CheckoutWizardFactory();
|
CheckoutWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// BaseCheckoutWizard
|
// BaseCheckoutWizard
|
||||||
QList<QWizardPage*> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPage,
|
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPage,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
};
|
};
|
||||||
@@ -57,7 +56,7 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
CheckoutWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -48,21 +48,9 @@ CloneWizardFactory::CloneWizardFactory()
|
|||||||
setDisplayName(tr("Git Repository Clone"));
|
setDisplayName(tr("Git Repository Clone"));
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
return new CloneWizard(parameterPages, parent);
|
return new CloneWizard(path, parent);
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWizardPage*> CloneWizardFactory::createParameterPages(const QString &path)
|
|
||||||
{
|
|
||||||
QList<QWizardPage*> rc;
|
|
||||||
const Internal::GitVersionControl *vc = Internal::GitPlugin::instance()->gitVersionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
rc.append(new VcsBase::VcsConfigurationPage(vc));
|
|
||||||
CloneWizardPage *cwp = new CloneWizardPage;
|
|
||||||
cwp->setPath(path);
|
|
||||||
rc.push_back(cwp);
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
@@ -83,11 +71,18 @@ VcsBase::Command *CloneWizardFactory::createCommand(const QList<QWizardPage*> &p
|
|||||||
// CloneWizard:
|
// CloneWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
CloneWizard::CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{
|
{
|
||||||
setTitle(tr("Cloning"));
|
setTitle(tr("Cloning"));
|
||||||
setStartedStatus(tr("Cloning started..."));
|
setStartedStatus(tr("Cloning started..."));
|
||||||
|
|
||||||
|
const Internal::GitVersionControl *vc = Internal::GitPlugin::instance()->gitVersionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsBase::VcsConfigurationPage(vc));
|
||||||
|
CloneWizardPage *cwp = new CloneWizardPage;
|
||||||
|
cwp->setPath(path);
|
||||||
|
addPage(cwp);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -43,11 +43,10 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
CloneWizardFactory();
|
CloneWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// BaseCheckoutWizard
|
// BaseCheckoutWizard
|
||||||
QList<QWizardPage*> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
};
|
};
|
||||||
@@ -57,7 +56,7 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
CloneWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -77,26 +77,9 @@ GitoriousCloneWizardFactory::GitoriousCloneWizardFactory()
|
|||||||
setDisplayName(tr("Gitorious Repository Clone"));
|
setDisplayName(tr("Gitorious Repository Clone"));
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
return new GitoriousCloneWizard(parameterPages, parent);
|
return new GitoriousCloneWizard(path, parent);
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWizardPage*> GitoriousCloneWizardFactory::createParameterPages(const QString &path)
|
|
||||||
{
|
|
||||||
QList<QWizardPage*> rc;
|
|
||||||
const Core::IVersionControl *vc = Git::Internal::GitPlugin::instance()->versionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
rc.append(new VcsBase::VcsConfigurationPage(vc));
|
|
||||||
|
|
||||||
GitoriousHostWizardPage *hostPage = new GitoriousHostWizardPage;
|
|
||||||
GitoriousProjectWizardPage *projectPage = new GitoriousProjectWizardPage(hostPage);
|
|
||||||
GitoriousRepositoryWizardPage *repoPage = new GitoriousRepositoryWizardPage(projectPage);
|
|
||||||
GitoriousCloneWizardPage *clonePage = new GitoriousCloneWizardPage(repoPage);
|
|
||||||
clonePage->setPath(path);
|
|
||||||
|
|
||||||
rc << hostPage << projectPage << repoPage << clonePage;
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::Command *GitoriousCloneWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *GitoriousCloneWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
@@ -115,9 +98,27 @@ VcsBase::Command *GitoriousCloneWizardFactory::createCommand(const QList<QWizard
|
|||||||
// GitoriousCloneWizard:
|
// GitoriousCloneWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
GitoriousCloneWizard::GitoriousCloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{ }
|
{
|
||||||
|
setTitle(tr("Cloning"));
|
||||||
|
setStartedStatus(tr("Cloning started..."));
|
||||||
|
|
||||||
|
const Core::IVersionControl *vc = Git::Internal::GitPlugin::instance()->versionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsBase::VcsConfigurationPage(vc));
|
||||||
|
|
||||||
|
GitoriousHostWizardPage *hostPage = new GitoriousHostWizardPage;
|
||||||
|
GitoriousProjectWizardPage *projectPage = new GitoriousProjectWizardPage(hostPage);
|
||||||
|
GitoriousRepositoryWizardPage *repoPage = new GitoriousRepositoryWizardPage(projectPage);
|
||||||
|
GitoriousCloneWizardPage *clonePage = new GitoriousCloneWizardPage(repoPage);
|
||||||
|
clonePage->setPath(path);
|
||||||
|
|
||||||
|
addPage(hostPage);
|
||||||
|
addPage(projectPage);
|
||||||
|
addPage(repoPage);
|
||||||
|
addPage(clonePage);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Gitorius
|
} // namespace Gitorius
|
||||||
|
|||||||
@@ -45,11 +45,10 @@ class GitoriousCloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
GitoriousCloneWizardFactory();
|
GitoriousCloneWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// BaseCheckoutWizard
|
// BaseCheckoutWizard
|
||||||
QList<QWizardPage*> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
};
|
};
|
||||||
@@ -59,7 +58,7 @@ class GitoriousCloneWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GitoriousCloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
GitoriousCloneWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,21 +48,9 @@ CloneWizardFactory::CloneWizardFactory()
|
|||||||
setDisplayName(tr("Mercurial Clone"));
|
setDisplayName(tr("Mercurial Clone"));
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseCheckoutWizard *CloneWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
return new CloneWizard(parameterPages, parent);
|
return new CloneWizard(path, parent);
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWizardPage *> CloneWizardFactory::createParameterPages(const QString &path)
|
|
||||||
{
|
|
||||||
QList<QWizardPage *> wizardPageList;
|
|
||||||
const Core::IVersionControl *vc = MercurialPlugin::instance()->versionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
wizardPageList.append(new VcsConfigurationPage(vc));
|
|
||||||
CloneWizardPage *page = new CloneWizardPage;
|
|
||||||
page->setPath(path);
|
|
||||||
wizardPageList.append(page);
|
|
||||||
return wizardPageList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> ¶meterPages,
|
Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> ¶meterPages,
|
||||||
@@ -95,9 +83,16 @@ Command *CloneWizardFactory::createCommand(const QList<QWizardPage *> ¶meter
|
|||||||
// CloneWizard:
|
// CloneWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
CloneWizard::CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{
|
{
|
||||||
setTitle(tr("Cloning"));
|
setTitle(tr("Cloning"));
|
||||||
setStartedStatus(tr("Cloning started..."));
|
setStartedStatus(tr("Cloning started..."));
|
||||||
|
|
||||||
|
const Core::IVersionControl *vc = MercurialPlugin::instance()->versionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsConfigurationPage(vc));
|
||||||
|
CloneWizardPage *page = new CloneWizardPage;
|
||||||
|
page->setPath(path);
|
||||||
|
addPage(page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,9 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
CloneWizardFactory();
|
CloneWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QList<QWizardPage *> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
VcsBase::Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
|
|
||||||
@@ -61,7 +60,7 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CloneWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
CloneWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace Internal
|
} //namespace Internal
|
||||||
|
|||||||
@@ -51,16 +51,9 @@ CheckoutWizardFactory::CheckoutWizardFactory()
|
|||||||
setDisplayName(tr("Subversion Checkout"));
|
setDisplayName(tr("Subversion Checkout"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QWizardPage*> CheckoutWizardFactory::createParameterPages(const QString &path)
|
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, QWidget *parent) const
|
||||||
{
|
{
|
||||||
QList<QWizardPage*> rc;
|
return new CheckoutWizard(path, parent);
|
||||||
const Core::IVersionControl *vc = SubversionPlugin::instance()->versionControl();
|
|
||||||
if (!vc->isConfigured())
|
|
||||||
rc.append(new VcsBase::VcsConfigurationPage(vc));
|
|
||||||
CheckoutWizardPage *cwp = new CheckoutWizardPage;
|
|
||||||
cwp->setPath(path);
|
|
||||||
rc.append(cwp);
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*> ¶meterPages,
|
||||||
@@ -95,9 +88,16 @@ VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*>
|
|||||||
// CheckoutWizard:
|
// CheckoutWizard:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
CheckoutWizard::CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
CheckoutWizard::CheckoutWizard(const QString &path, QWidget *parent) :
|
||||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
VcsBase::BaseCheckoutWizard(path, parent)
|
||||||
{ }
|
{
|
||||||
|
const Core::IVersionControl *vc = SubversionPlugin::instance()->versionControl();
|
||||||
|
if (!vc->isConfigured())
|
||||||
|
addPage(new VcsBase::VcsConfigurationPage(vc));
|
||||||
|
CheckoutWizardPage *cwp = new CheckoutWizardPage;
|
||||||
|
cwp->setPath(path);
|
||||||
|
addPage(cwp);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Subversion
|
} // namespace Subversion
|
||||||
|
|||||||
@@ -43,11 +43,10 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
|||||||
public:
|
public:
|
||||||
CheckoutWizardFactory();
|
CheckoutWizardFactory();
|
||||||
|
|
||||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// BaseCheckoutWizard
|
// BaseCheckoutWizard
|
||||||
QList<QWizardPage*> createParameterPages(const QString &path);
|
|
||||||
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPage,
|
VcsBase::Command *createCommand(const QList<QWizardPage*> ¶meterPage,
|
||||||
QString *checkoutPath);
|
QString *checkoutPath);
|
||||||
};
|
};
|
||||||
@@ -57,7 +56,7 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
CheckoutWizard(const QString &path, QWidget *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -44,16 +44,12 @@
|
|||||||
|
|
||||||
namespace VcsBase {
|
namespace VcsBase {
|
||||||
|
|
||||||
BaseCheckoutWizard::BaseCheckoutWizard(const QList<QWizardPage *> ¶meterPages,
|
BaseCheckoutWizard::BaseCheckoutWizard(const QString &path, QWidget *parent) :
|
||||||
QWidget *parent) :
|
|
||||||
Utils::Wizard(parent),
|
Utils::Wizard(parent),
|
||||||
m_progressPage(new Internal::CheckoutProgressWizardPage),
|
m_progressPage(new Internal::CheckoutProgressWizardPage),
|
||||||
m_progressPageId(-1)
|
m_progressPageId(-1)
|
||||||
{
|
{
|
||||||
foreach (QWizardPage *wp, parameterPages)
|
Q_UNUSED(path);
|
||||||
addPage(wp);
|
|
||||||
m_progressPageId = parameterPages.size();
|
|
||||||
setPage(m_progressPageId, m_progressPage);
|
|
||||||
connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotPageChanged(int)));
|
connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotPageChanged(int)));
|
||||||
connect(m_progressPage, SIGNAL(terminated(bool)), this, SLOT(slotTerminated(bool)));
|
connect(m_progressPage, SIGNAL(terminated(bool)), this, SLOT(slotTerminated(bool)));
|
||||||
}
|
}
|
||||||
@@ -88,6 +84,12 @@ void BaseCheckoutWizard::start(Command *command)
|
|||||||
m_progressPage->start(command);
|
m_progressPage->start(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int BaseCheckoutWizard::exec()
|
||||||
|
{
|
||||||
|
m_progressPageId = addPage(m_progressPage);
|
||||||
|
return Utils::Wizard::exec();
|
||||||
|
}
|
||||||
|
|
||||||
void BaseCheckoutWizard::reject()
|
void BaseCheckoutWizard::reject()
|
||||||
{
|
{
|
||||||
// First click kills, 2nd closes
|
// First click kills, 2nd closes
|
||||||
|
|||||||
@@ -45,12 +45,15 @@ class VCSBASE_EXPORT BaseCheckoutWizard : public Utils::Wizard
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BaseCheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
explicit BaseCheckoutWizard(const QString &path, QWidget *parent = 0);
|
||||||
|
|
||||||
void setTitle(const QString &title);
|
void setTitle(const QString &title);
|
||||||
void setStartedStatus(const QString &title);
|
void setStartedStatus(const QString &title);
|
||||||
void start(VcsBase::Command *command);
|
void start(VcsBase::Command *command);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
int exec();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void progressPageShown();
|
void progressPageShown();
|
||||||
|
|
||||||
|
|||||||
@@ -71,13 +71,11 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
BaseCheckoutWizard *wizard;
|
BaseCheckoutWizard *wizard;
|
||||||
QList<QWizardPage *> parameterPages;
|
|
||||||
QString checkoutPath;
|
QString checkoutPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
void BaseCheckoutWizardFactoryPrivate::clear()
|
void BaseCheckoutWizardFactoryPrivate::clear()
|
||||||
{
|
{
|
||||||
parameterPages.clear();
|
|
||||||
delete wizard;
|
delete wizard;
|
||||||
wizard = 0;
|
wizard = 0;
|
||||||
checkoutPath.clear();
|
checkoutPath.clear();
|
||||||
@@ -108,8 +106,7 @@ void BaseCheckoutWizardFactory::runWizard(const QString &path, QWidget *parent,
|
|||||||
QTC_ASSERT(!d->wizard, return);
|
QTC_ASSERT(!d->wizard, return);
|
||||||
// Create dialog and launch
|
// Create dialog and launch
|
||||||
|
|
||||||
d->parameterPages = createParameterPages(path);
|
d->wizard = create(path, parent);
|
||||||
d->wizard = create(d->parameterPages, parent);
|
|
||||||
connect(d->wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
|
connect(d->wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
|
||||||
d->wizard->setWindowTitle(displayName());
|
d->wizard->setWindowTitle(displayName());
|
||||||
if (d->wizard->exec() != QDialog::Accepted) {
|
if (d->wizard->exec() != QDialog::Accepted) {
|
||||||
@@ -180,7 +177,10 @@ QString BaseCheckoutWizardFactory::openProject(const QString &path, QString *err
|
|||||||
|
|
||||||
void BaseCheckoutWizardFactory::slotProgressPageShown()
|
void BaseCheckoutWizardFactory::slotProgressPageShown()
|
||||||
{
|
{
|
||||||
Command *command = createCommand(d->parameterPages, &(d->checkoutPath));
|
QList<QWizardPage *> pages;
|
||||||
|
foreach (int id, d->wizard->pageIds())
|
||||||
|
pages << d->wizard->page(id);
|
||||||
|
Command *command = createCommand(pages, &(d->checkoutPath));
|
||||||
d->wizard->start(command);
|
d->wizard->start(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,10 +58,9 @@ public:
|
|||||||
|
|
||||||
static QString openProject(const QString &path, QString *errorMessage);
|
static QString openProject(const QString &path, QString *errorMessage);
|
||||||
|
|
||||||
virtual BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const = 0;
|
virtual BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QList<QWizardPage *> createParameterPages(const QString &path) = 0;
|
|
||||||
virtual Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
virtual Command *createCommand(const QList<QWizardPage *> ¶meterPages,
|
||||||
QString *checkoutPath) = 0;
|
QString *checkoutPath) = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user