[Qt-creator] Use IBuildStepFactory in IBuildConfigurationFactory

Mateusz Loskot mateusz at loskot.net
Wed Nov 13 17:56:00 CET 2013


Hi,

Another question about the plugins API.

TLTR: Is it sensible to use IBuildStepFactory in IBuildConfigurationFactory?

I noticed, in GenericBuildConfigurationFactory::create() all steps
are created 'manually' according to this pattern:

GenericMakeStep* s = new GenericMakeStep(steps);
s-> ... // configure the step

This procedure is more or less a copy of code from
GenericMakeStepFactory::create() definition.

I also noticed that this kind of pattern is used across other plugins as well.

Why GenericBuildConfigurationFactory::create() does not use
GenericMakeStepFactory::create() to create steps?

It makes me wonder, does this common pattern indicate that
it is not kosher to use (specialisation of) IBuildStepFactory
in implementation of (specialisation of) IBuildConfigurationFactory,
within a plugin?

IOW, does it mean those factories are dedicated for use by 'external'
parties only, i.e. Qt Creator core, and should not be used
within the same plugin those subclasses are implemented?

Best regards
-- 
Mateusz  Loskot, http://mateusz.loskot.net



More information about the Qt-creator mailing list