Review Request 119079: Add utility function for loading all plugins from a given dir + easy accessor for metadata

Alex Merry alex.merry at kde.org
Sat Jul 19 09:27:02 UTC 2014


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



src/lib/plugin/kpluginloader.h
<https://git.reviewboard.kde.org/r/119079/#comment43448>

    What about plugins that do not have metadata?



src/lib/plugin/kpluginmetadata.h
<https://git.reviewboard.kde.org/r/119079/#comment43449>

    If you don't put at least minimal documentation in, Doxygen will warn about undocumented methods.



src/lib/plugin/kpluginmetadata.cpp
<https://git.reviewboard.kde.org/r/119079/#comment43450>

    I think this would be clearer as "passing QFileInfo an empty string gives the CWD, which is not what we want". And put the comment one line up, so it applies to the if() statement, rather than the assignment.


I see you haven't changed the KPluginLoader methods - have you looked to see if they are the ones that are likely to be useful?

- Alex Merry


On July 18, 2014, 1:34 p.m., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119079/
> -----------------------------------------------------------
> 
> (Updated July 18, 2014, 1:34 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> This class simplifies reading the metadata from a qt plugin by providing
> type safe accessor functions for the standard plugininfo keys that are
> also used by the .desktop file based KPluginInfo
> 
> KPluginMetaData: Read the translated value for name and description
> 
> The "Name" and "Comment" fields of the metadata should be translated
> since they will be shown to the user (e.g. in the plugin selection
> dialog)
> 
> Add a unit test for KPluginMetaData
> 
> 
> Add KPluginMetaData::findPlugins()
> 
> 
> Add a unit test for KPluginMetaData::findPlugins()
> 
> 
> Introduce KPluginLoader::instantiatePlugins() and add a unit test
> 
> This method allows easily instantiating all plugins in a given directory
> 
> KPluginMetaData::pluginName() was changed to return the base name of the
> plugin file if no plugin name was set in the JSON metadata
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 75d12932b36fcfe4ae1d538176ef9f85f60f15dd 
>   autotests/jsonplugin.json d86fad49e5d074762d70282b3ace4bf3e6db58df 
>   autotests/kpluginloadertest.cpp c8225c02de3a64cae29d88954700dbc6f03ff1b0 
>   autotests/kpluginmetadatatest.cpp PRE-CREATION 
>   src/lib/CMakeLists.txt 26eb5a1d4d56742a3395ba2645290bea15aee181 
>   src/lib/plugin/kpluginloader.h 0b7a53d3b879cec1d755b849d9d8c640d251a379 
>   src/lib/plugin/kpluginloader.cpp 9b3c5b6aec537b03b0d8341b33f6f4d7a76c8344 
>   src/lib/plugin/kpluginmetadata.h PRE-CREATION 
>   src/lib/plugin/kpluginmetadata.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/119079/diff/
> 
> 
> Testing
> -------
> 
> Added a unit test
> 
> Should easily allow loading all plugins from a given directory without needing kbuildsycoca
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140719/4d64fca7/attachment.html>


More information about the Kde-frameworks-devel mailing list