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:
@@ -329,26 +329,6 @@ bool BaseFileWizardFactory::writeFiles(const GeneratedFiles &files, QString *err
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
Reads the \c shortTitle dynamic property of \a pageId and applies it as
|
||||
the title of corresponding progress item.
|
||||
*/
|
||||
|
||||
void BaseFileWizardFactory::applyExtensionPageShortTitle(Utils::Wizard *wizard, int pageId)
|
||||
{
|
||||
if (pageId < 0)
|
||||
return;
|
||||
QWizardPage *p = wizard->page(pageId);
|
||||
if (!p)
|
||||
return;
|
||||
Utils::WizardProgressItem *item = wizard->wizardProgress()->item(pageId);
|
||||
if (!item)
|
||||
return;
|
||||
const QString shortTitle = p->property("shortTitle").toString();
|
||||
if (!shortTitle.isEmpty())
|
||||
item->setTitle(shortTitle);
|
||||
}
|
||||
|
||||
/*!
|
||||
Overwrite to perform steps to be done after files are actually created.
|
||||
|
||||
@@ -529,7 +509,7 @@ BaseFileWizard *StandardFileWizardFactory::create(QWidget *parent, const WizardD
|
||||
wizard->setWindowTitle(tr("New %1").arg(displayName()));
|
||||
wizard->setPath(parameters.defaultPath());
|
||||
foreach (QWizardPage *p, parameters.extensionPages())
|
||||
BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
|
||||
wizard->addPage(p);
|
||||
return wizard;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user