VcsBase: Remove BaseCheckoutWizard::setCustomLabels()

Also assert that d->wizard is not in use already and use d->wizard
consistently.

Change-Id: I85599f80e92edb2a0a0fc52c5fed1e484d0beac9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2014-05-05 16:24:00 +02:00
parent e9526eadb8
commit 6644a08c21
5 changed files with 19 additions and 24 deletions

View File

@@ -34,6 +34,8 @@
#include <projectexplorer/projectexplorer.h>
#include <utils/qtcassert.h>
#include <QCoreApplication>
#include <QDir>
#include <QMessageBox>
@@ -71,8 +73,6 @@ public:
BaseCheckoutWizard *wizard;
QList<QWizardPage *> parameterPages;
QString checkoutPath;
QString progressTitle;
QString startedStatus;
};
void BaseCheckoutWizardFactoryPrivate::clear()
@@ -105,18 +105,14 @@ void BaseCheckoutWizardFactory::runWizard(const QString &path, QWidget *parent,
{
Q_UNUSED(platform);
Q_UNUSED(extraValues);
QTC_ASSERT(!d->wizard, return);
// Create dialog and launch
d->parameterPages = createParameterPages(path);
BaseCheckoutWizard *wizard = create(d->parameterPages, parent);
if (!d->progressTitle.isEmpty())
wizard->setTitle(d->progressTitle);
if (!d->startedStatus.isEmpty())
wizard->setStartedStatus(d->startedStatus);
d->wizard = wizard;
connect(wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
wizard->setWindowTitle(displayName());
if (wizard->exec() != QDialog::Accepted)
d->wizard = create(d->parameterPages, parent);
connect(d->wizard, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
d->wizard->setWindowTitle(displayName());
if (d->wizard->exec() != QDialog::Accepted)
return;
// Now try to find the project file and open
const QString checkoutPath = d->checkoutPath;
@@ -180,12 +176,6 @@ QString BaseCheckoutWizardFactory::openProject(const QString &path, QString *err
return projectFile;
}
void BaseCheckoutWizardFactory::setCustomLabels(const QString &progressTitle, const QString &startedStatus)
{
d->progressTitle = progressTitle;
d->startedStatus = startedStatus;
}
void BaseCheckoutWizardFactory::slotProgressPageShown()
{
Command *command = createCommand(d->parameterPages, &(d->checkoutPath));