1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #include "clonewizard.h"
34 #include "clonewizardpage.h"
36 #include <vcsbase/checkoutjobs.h>
37 #include <vcsbase/vcsbaseconstants.h>
38 #include <utils/qtcassert.h>
40 #include <QtGui/QIcon>
45 CloneWizard::CloneWizard(QObject *parent) :
46 VCSBase::BaseCheckoutWizard(parent)
48 setId(QLatin1String(VCSBase::Constants::VCS_ID_GIT));
51 QIcon CloneWizard::icon() const
53 return QIcon(QLatin1String(":/git/images/git.png"));
56 QString CloneWizard::description() const
58 return tr("Clones a Git repository and tries to load the contained project.");
61 QString CloneWizard::displayName() const
63 return tr("Git Repository Clone");
66 QList<QWizardPage*> CloneWizard::createParameterPages(const QString &path)
68 CloneWizardPage *cwp = new CloneWizardPage;
70 QList<QWizardPage*> rc;
75 QSharedPointer<VCSBase::AbstractCheckoutJob> CloneWizard::createJob(const QList<QWizardPage*> ¶meterPages,
76 QString *checkoutPath)
78 // Collect parameters for the clone command.
79 const CloneWizardPage *cwp = qobject_cast<const CloneWizardPage *>(parameterPages.front());
80 QTC_ASSERT(cwp, return QSharedPointer<VCSBase::AbstractCheckoutJob>())
81 return cwp->createCheckoutJob(checkoutPath);
84 } // namespace Internal