Commit 4a72355b authored by Tobias Hunger's avatar Tobias Hunger
Browse files

CustomWizardPage: Set page title in constructor



That avoids having to do it whenever the page is created.

Change-Id: Ie58288a66af79301295d74c3c9f892dc20a832af
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent ce37f052
......@@ -143,8 +143,6 @@ Core::BaseFileWizard *CustomWizard::create(QWidget *parent, const Core::WizardDi
Internal::CustomWizardPage *customPage = new Internal::CustomWizardPage(d->m_context, parameters());
customPage->setPath(p.defaultPath());
addWizardPage(wizard, customPage, parameters()->firstPageId);
if (!parameters()->fieldPageTitle.isEmpty())
customPage->setTitle(parameters()->fieldPageTitle);
foreach (QWizardPage *ep, p.extensionPages())
wizard->addPage(ep);
if (CustomWizardPrivate::verbose)
......@@ -521,8 +519,6 @@ void CustomProjectWizard::initProjectWizardDialog(BaseProjectWizardDialog *w,
if (!pa->fields.isEmpty()) {
Internal::CustomWizardFieldPage *cp = new Internal::CustomWizardFieldPage(ctx, pa);
addWizardPage(w, cp, parameters()->firstPageId);
if (!pa->fieldPageTitle.isEmpty())
cp->setTitle(pa->fieldPageTitle);
}
foreach (QWizardPage *ep, extensionPages)
w->addPage(ep);
......
......@@ -193,6 +193,8 @@ CustomWizardFieldPage::CustomWizardFieldPage(const QSharedPointer<CustomWizardCo
vLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
vLayout->addWidget(m_errorLabel);
setLayout(vLayout);
if (!parameters->fieldPageTitle.isEmpty())
setTitle(parameters->fieldPageTitle);
}
CustomWizardFieldPage::~CustomWizardFieldPage()
......
Supports Markdown
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