forked from qt-creator/qt-creator
Core: Silence wizard handling
The way wizards get created has changed. Originally the
factory had been able to return an empty list in case something
was wrong. This list's items had been processed. Now it just
returns a nullptr for each item as they get processed now one by one.
This triggers soft asserts when e.g. having only a subset of
plugins loaded like when running plugin unit tests.
Amends 1cf6b031cf.
Change-Id: Ia91df462ea52efe301c2dca07bc69aeb2f569b78
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -175,7 +175,9 @@ QList<IWizardFactory*> IWizardFactory::allWizardFactories()
|
|||||||
QHash<Id, IWizardFactory *> sanityCheck;
|
QHash<Id, IWizardFactory *> sanityCheck;
|
||||||
for (const FactoryCreator &fc : std::as_const(s_factoryCreators)) {
|
for (const FactoryCreator &fc : std::as_const(s_factoryCreators)) {
|
||||||
IWizardFactory *newFactory = fc();
|
IWizardFactory *newFactory = fc();
|
||||||
QTC_ASSERT(newFactory, continue);
|
// skip factories referencing wizard page generators provided by plugins not loaded
|
||||||
|
if (!newFactory)
|
||||||
|
continue;
|
||||||
IWizardFactory *existingFactory = sanityCheck.value(newFactory->id());
|
IWizardFactory *existingFactory = sanityCheck.value(newFactory->id());
|
||||||
|
|
||||||
QTC_ASSERT(existingFactory != newFactory, continue);
|
QTC_ASSERT(existingFactory != newFactory, continue);
|
||||||
|
|||||||
Reference in New Issue
Block a user