forked from qt-creator/qt-creator
IWizardFactory: Create wizards with factoryCreators
Do not use the object pool to hold potential wizards. Register FactoryCreator functions with IWizardFactory instead and use those to create the wizards when necessary. This saves us a couple of cycles during startup since we can now delay construction of all wizards and it makes us more flexible wrt. managing the lifecycle of the wizard factories. Change-Id: I95d6a6dfcdf0fd995e1934a9fefcd96c6a676753 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -106,11 +106,12 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString
|
||||
|
||||
ProjectExplorer::KitManager::registerKitInformation(new QmakeKitInformation);
|
||||
|
||||
addAutoReleasedObject(new SubdirsProjectWizard);
|
||||
addAutoReleasedObject(new GuiAppWizard);
|
||||
addAutoReleasedObject(new LibraryWizard);
|
||||
addAutoReleasedObject(new TestWizard);
|
||||
addAutoReleasedObject(new CustomWidgetWizard);
|
||||
IWizardFactory::registerFactoryCreator([]() {
|
||||
QList<IWizardFactory *> result;
|
||||
result << new SubdirsProjectWizard << new GuiAppWizard << new LibraryWizard
|
||||
<< new TestWizard << new CustomWidgetWizard;
|
||||
return result;
|
||||
});
|
||||
|
||||
addAutoReleasedObject(new CustomWizardMetaFactory<CustomQmakeProjectWizard>
|
||||
(QLatin1String("qmakeproject"), IWizardFactory::ProjectWizard));
|
||||
|
||||
Reference in New Issue
Block a user