Inter plugin communication

Jens Herden jens at kdewebdev.org
Sun May 22 10:27:03 UTC 2005


Hi Roberto,

> > What happens if the plugin 1 was not loaded? Is it still save to call
> > this? setInstance() was never executed what will I get from MyInterface
> > *instance() ?
>
> it's not possible! KDevelop loads all the plugins and then it emits the
> signal coreInitialized(). instance() == 0x0 means the plugin is not
> available (i.e. disabled, not installed, and so on..)

OK, I see but do you assume that this is a core plugin? 
I think Andras is talking about language depending plugins. And the user can 
choose which plugins to load and which not in the project settings. That was 
the reason for my worst case thinking.

> of course it's not safe to call the method ::instance() from a
> constructor(only setInstance() should be called from a constructor).

Yes, that makes sense. 


Jens




More information about the KDevelop-devel mailing list