Review Request 120586: Fix KPluginSelector not adding non .desktop file plugins

Sebastian Kügler sebas at kde.org
Tue Oct 21 21:27:37 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120586/#review68858
-----------------------------------------------------------

Ship it!


I think we need a way to compare whether two plugins are the same. Even with the additional comparison of libraryPath(). libraryPath may be the same for some plugins (those that only differ in metadata, for example to provide default arguments, or somesuch), that's only the case where metadata file (.desktop) and actual plugin (.so file for example) differ. This patch works, since when the metadata is loaded from the .so file itself, we can be sure it's the same metadata, so it works also in those cases.

I think it doesn't hurt to also fix entryPath for plugins loading their metadata from the .so file. In the end, .desktop or .so is an implementation detail that should not be reflected in the API's usage.

- Sebastian Kügler


On Oct. 14, 2014, 6:52 p.m., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120586/
> -----------------------------------------------------------
> 
> (Updated Oct. 14, 2014, 6:52 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kcmutils
> 
> 
> Description
> -------
> 
> KPluginSelector always assumed those plugins had already been added to
> the list because it only compares KPluginInfo::entryPath() for equality
> which returns an empty string if the plugin metadata was loaded directly
> from the shared library. Therefore as soon as one plugin with the
> metadata embedded into the library had been loaded all others would
> compare equal to that.
> 
> Is this the correct fix or should KPluginInfo::entryPath() be changed?
> 
> 
> Diffs
> -----
> 
>   src/kpluginselector_p.h 43648114224f476ea3c30f6bd255206f9c415d21 
> 
> Diff: https://git.reviewboard.kde.org/r/120586/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141021/9eab201c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list