Commit a561e59a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Utils::Wizard: Move hack out of the base class



Implement it instead where it is needed.

Change-Id: If7f76bcfa82705936b555a5ebfc221978c70e106
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent c0ae81f4
......@@ -384,12 +384,6 @@ WizardProgress *Wizard::wizardProgress() const
return d->m_wizardProgress;
}
bool Wizard::validateCurrentPage()
{
emit nextClicked();
return QWizard::validateCurrentPage();
}
bool Wizard::hasField(const QString &name) const
{
return d_ptr->m_fieldNames.contains(name);
......
......@@ -58,7 +58,6 @@ public:
void setStartId(int pageId);
WizardProgress *wizardProgress() const;
virtual bool validateCurrentPage();
template<class T> T *find() const
{
......@@ -79,10 +78,6 @@ public:
public slots:
void showVariables();
signals:
void nextClicked(); /* workaround for QWizard behavior where page->initialize is
* called before currentIdChanged */
protected:
virtual QString stringify(const QVariant &v) const;
virtual QString evaluate(const QVariant &v) const;
......
......@@ -98,7 +98,6 @@ void BaseProjectWizardDialog::init()
setPage(d->desiredIntroPageId, d->introPage);
}
connect(this, SIGNAL(accepted()), this, SLOT(slotAccepted()));
connect(this, SIGNAL(nextClicked()), this, SLOT(nextClicked()));
}
BaseProjectWizardDialog::~BaseProjectWizardDialog()
......@@ -155,10 +154,11 @@ void BaseProjectWizardDialog::slotAccepted()
}
}
void BaseProjectWizardDialog::nextClicked()
bool BaseProjectWizardDialog::validateCurrentPage()
{
if (currentId() == d->introPageId)
emit projectParametersChanged(d->introPage->projectName(), d->introPage->path());
return Core::BaseFileWizard::validateCurrentPage();
}
Utils::ProjectIntroPage *BaseProjectWizardDialog::introPage() const
......
......@@ -86,10 +86,10 @@ protected:
private slots:
void slotAccepted();
void nextClicked();
private:
void init();
bool validateCurrentPage();
BaseProjectWizardDialogPrivate *d;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment