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:
Christian Stenger
2022-10-25 11:36:19 +02:00
parent f4545807de
commit c4204f6eaa

View File

@@ -175,7 +175,9 @@ QList<IWizardFactory*> IWizardFactory::allWizardFactories()
QHash<Id, IWizardFactory *> sanityCheck;
for (const FactoryCreator &fc : std::as_const(s_factoryCreators)) {
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());
QTC_ASSERT(existingFactory != newFactory, continue);