Should X-KDevelop-Interfaces list "grandparent" interfaces?

Andreas Pakulat apaku at gmx.de
Sun Nov 22 23:05:19 UTC 2009


On 22.11.09 23:20:48, Daniel Calviño Sánchez wrote:
> Hi,
> 
> I have seen that
> kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder.desktop:60
> contains:
> X-KDevelop-Interfaces=org.kdevelop.ICMakeBuilder
> 
> CMakeBuilder class
> (kdevelop/projectbuilders/cmakebuilder/cmakebuilder.h) inherits from
> KDevelop::IPlugin and ICMakeBuilder. And ICMakeBuilder class
> (kdevelop/projectbuilders/cmakebuilder/icmakebuilder.h) inherits from
> KDevelop::IProjectBuilder
> (kdevplatform/project/interfaces/iprojectbuilder.h). Thus,
> CMakeBuilder inherits from KDevelop::IProjectBuilder.
> 
> In some tests I made,
> ICore::self()->pluginController()->allPluginsForExtension(
> "org.kdevelop.IProjectBuilder") doesn't return CMakeBuilder plugin.
> But if I change X-KDevelop-Interfaces to
> X-KDevelop-Interfaces=org.kdevelop.IProjectBuilder,org.kdevelop.ICMakeBuilder
> ICore::self()->pluginController()->allPluginsForExtension(
> "org.kdevelop.IProjectBuilder" ) returns CMakeBuilder (as I presume is
> the intended behavior).
> 
> So my question is, should the interface be added to the desktop file?
> Maybe there is a better way to do it, or I'm missing something and now
> it works as it should.

No, a plugin needs to list all interfaces it exports, even those that
are "inherited".

Andreas

-- 
You love your home and want it to be beautiful.




More information about the KDevelop-devel mailing list