Skip to content

Make the configuration for each filter/generator explicit

Halla Rempt requested to merge work/rempt/factoryconfiguration into master

We had two methods to get the default configuration for a processor: factoryConfiguration and defaultConfiguration.

Over time, some overloads of defaultConfiguration called factoryConfiguration, some didn't and some filters, while having options, wouldn't set them on the factory or the default configuration.

Now factoryConfiguration is pure virtual, defaultConfiguration is no longer virtual. Every processor has a factoryConfiguration implementation. For some filters, this simplifies the code, since they called factoryConfiguration and cast it into the filter-specific configuration class.

There is a new non-virtual, protected method KisBaseProcessor::emptyFactoryConfiguration that provides an empty KisFilterConfiguration object with the id, version and resourcesInterface set.

See:

https://krita-artists.org/t/burn-filter-does-not-return-default-configuration/69478/2

Merge request reports