VCS: Use the configuration page in all the checkout wizards

Task-number: QTCREATORBUG-3752
This commit is contained in:
Tobias Hunger
2011-04-20 15:49:06 +02:00
parent b520f184d3
commit cceb0adbaa
13 changed files with 52 additions and 19 deletions

View File

@@ -33,8 +33,12 @@
#include "clonewizard.h"
#include "clonewizardpage.h"
#include "gitplugin.h"
#include "gitversioncontrol.h"
#include <vcsbase/checkoutjobs.h>
#include <vcsbase/vcsbaseconstants.h>
#include <vcsbase/vcsconfigurationpage.h>
#include <utils/qtcassert.h>
#include <QtGui/QIcon>
@@ -65,9 +69,12 @@ QString CloneWizard::displayName() const
QList<QWizardPage*> CloneWizard::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);
QList<QWizardPage*> rc;
rc.push_back(cwp);
return rc;
}

View File

@@ -36,8 +36,12 @@
#include "gitoriousrepositorywizardpage.h"
#include "clonewizardpage.h"
#include <git/gitplugin.h>
#include <coreplugin/iversioncontrol.h>
#include <vcsbase/checkoutjobs.h>
#include <vcsbase/vcsbaseconstants.h>
#include <vcsbase/vcsconfigurationpage.h>
#include <utils/qtcassert.h>
#include <QtCore/QUrl>
@@ -93,13 +97,17 @@ QString GitoriousCloneWizard::displayName() const
QList<QWizardPage*> GitoriousCloneWizard::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);
QList<QWizardPage*> rc;
rc << hostPage << projectPage << repoPage << clonePage;
return rc;
}