forked from qt-creator/qt-creator
BaseFileWizard: Get rid of applyExtensionPageShortTitle(...)
That method was used to set a title in the progress view of the wizard that is different from the page title. That is used exactly once and there it adds more confusion than it helps. So get rid of the whole thing. Consistently set the "shortTitle" property instead for all wizards that want to have a separate short title. Change-Id: Ia4881e9c00891058629491f9e9de4ac421c59727 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include "pythonclassnamepage.h"
|
||||
#include "../pythoneditorconstants.h"
|
||||
|
||||
#include <utils/wizard.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <utils/newclasswidget.h>
|
||||
@@ -72,6 +74,8 @@ ClassNamePage::ClassNamePage(QWidget *parent)
|
||||
pageLayout->addItem(vSpacer);
|
||||
|
||||
initParameters();
|
||||
|
||||
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Details"));
|
||||
}
|
||||
|
||||
ClassNamePage::~ClassNamePage()
|
||||
|
||||
@@ -59,7 +59,7 @@ Core::BaseFileWizard *ClassWizard::create(QWidget *parent, const Core::WizardDia
|
||||
{
|
||||
ClassWizardDialog *wizard = new ClassWizardDialog(parent);
|
||||
foreach (QWizardPage *p, parameters.extensionPages())
|
||||
BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
|
||||
wizard->addPage(p);
|
||||
wizard->setPath(parameters.defaultPath());
|
||||
wizard->setExtraValues(parameters.extraValues());
|
||||
return wizard;
|
||||
|
||||
@@ -41,8 +41,7 @@ ClassWizardDialog::ClassWizardDialog(QWidget *parent) :
|
||||
m_classNamePage(new ClassNamePage(this))
|
||||
{
|
||||
setWindowTitle(tr("Python Class Wizard"));
|
||||
const int classNameId = addPage(m_classNamePage.data());
|
||||
wizardProgress()->item(classNameId)->setTitle(tr("Details"));
|
||||
addPage(m_classNamePage.data());
|
||||
}
|
||||
|
||||
ClassWizardDialog::~ClassWizardDialog()
|
||||
|
||||
@@ -67,7 +67,7 @@ Core::BaseFileWizard *FileWizard::create(QWidget *parent, const Core::WizardDial
|
||||
wizard->setWindowTitle(tr("New %1").arg(displayName()));
|
||||
wizard->setPath(parameters.defaultPath());
|
||||
foreach (QWizardPage *p, parameters.extensionPages())
|
||||
applyExtensionPageShortTitle(wizard, wizard->addPage(p));
|
||||
wizard->addPage(p);
|
||||
|
||||
return wizard;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user