Review Request 123669: Add KPluginLoader::findPluginsById convenience API

Sebastian Kügler sebas at kde.org
Thu May 7 12:05:39 UTC 2015



> On May 7, 2015, 7:24 a.m., Alex Richardson wrote:
> > Seems like this is duplicated in a few places already so I agree we should add it. But won't most users of the API want only a single plugin returned?
> > Maybe also add a function `KPluginMetaData KPluginLoader::findPluginById(const QString& directory, const QString& pluginId)`?
> > Do we also need the function that returns a vector for a given ID?

At least our changes in libplasma need a QVector<KPluginMetaData>. Otherwise, a list seems easy enough to check if something's found. Returning a single metadata won't be very useful for us at this point (but I see it making sense).


> On May 7, 2015, 7:24 a.m., Alex Richardson wrote:
> > src/lib/plugin/kpluginloader.cpp, line 278
> > <https://git.reviewboard.kde.org/r/123669/diff/1/?file=367270#file367270line278>
> >
> >     QVector< KPluginMetaData >  -> QVector<KPluginMetaData>

I'll forego submitting a patch with just two spaces removed. Fixed it locally.


- Sebastian


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


On May 6, 2015, 11:21 p.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123669/
> -----------------------------------------------------------
> 
> (Updated May 6, 2015, 11:21 p.m.)
> 
> 
> Review request for KDE Frameworks, Alex Richardson and David Faure.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> Add findPluginsById convenience API
> 
> It's a quite common case to load a plugin from an ID. This makes it
> easy.
> 
> CHANGELOG:New KPluginLoader::findPluginById() convenience API
> REVIEW:123669
> 
> 
> Diffs
> -----
> 
>   autotests/kpluginloadertest.cpp 3ded0ebca2e0fd20e09bf6e4eca152d13ac11f46 
>   src/lib/plugin/kpluginloader.h 124bfab7e207b17d3c8ab4d5a88321af476aad42 
>   src/lib/plugin/kpluginloader.cpp 4310d6cd7792329511f12b28d7c68b0fdd013538 
> 
> Diff: https://git.reviewboard.kde.org/r/123669/diff/
> 
> 
> Testing
> -------
> 
> Added autotests, everything passes.
> 
> 
> Thanks,
> 
> Sebastian Kügler
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150507/8d6e38bf/attachment.html>


More information about the Kde-frameworks-devel mailing list