Review Request 120276: Initial port to frameworks for the comic dataengine.

Martin Klapetek martin.klapetek at gmail.com
Fri Sep 19 20:50:07 UTC 2014



> On Sept. 19, 2014, 9:33 p.m., Martin Klapetek wrote:
> > dataengines/comic/comic_package.cpp, line 49
> > <https://git.reviewboard.kde.org/r/120276/diff/2/?file=313492#file313492line49>
> >
> >     You're building this class as MODULE (ie. a plugin) but you don't define any plugin macro (K_PLUGIN_FACTORY), this can't work as a plugin without it
> >     
> >     Looks like you should keep this line (but port to K_PLUGIN_FACTORY)
> 
> Andrei Amuraritei wrote:
>     Please detail this.
>     I've added 
>     
>     #include <KPluginFactory>
>     
>     K_PLUGIN_FACTORY(ComicProviderKrossFactory, registerPlugin<ComicProviderKross>();)
>     
>     to comicproviderkross.cpp
>     
>     Old code had the usage of the old macro COMICPROVIDER_EXPORT_PLUGIN there.
> 
> Andrei Amuraritei wrote:
>     Also should there be a K_EXPORT_PLASMA_PACKAGE_WITH_JSON(ComicPackage, "plasma-packagestructure-comic.json") line at the end of comic_package.cpp ?

In the CMakeLists.txt you have this:

set(comicpackage_SRCS
    comic_package.cpp
    #comic_package_plugin.cpp
)

add_library(plasma_packagestructure_comic MODULE ${comicpackage_SRCS})

--

As you can see, "plasma_packagestructure_comic" is a plugin (the MODULE) consisting only of "comic_package.cpp". In order for this to be usable as a plugin, it needs the K_PLUGIN_FACTORY somewhere in comic_package.cpp, that used to be in the comic_package_plugin.cpp which got removed. As I said below, you should get rid of the COMICPROVIDER_EXPORT_PLUGIN and replace it with simple K_PLUGIN_FACTORY.


- Martin


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


On Sept. 19, 2014, 9:17 p.m., Andrei Amuraritei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120276/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2014, 9:17 p.m.)
> 
> 
> Review request for Plasma, David Edmundson, Marco Martin, and Sebastian Kügler.
> 
> 
> Repository: kdeplasma-addons
> 
> 
> Description
> -------
> 
> comic DataEngine initial port to frameworks.
> 
> 
> Diffs
> -----
> 
>   dataengines/comic/plasma-packagestructure-comic.desktop 67f96c0 
>   dataengines/comic/comic_package.cpp 6d2ff0b 
>   dataengines/comic/comicprovider.h 630ee8d 
>   dataengines/comic/comicprovider.cpp ab248a5 
>   dataengines/comic/comicproviderkross.h 46a9072 
>   dataengines/comic/comicproviderkross.cpp 9820f05 
>   dataengines/comic/comicproviderwrapper.h 81eee68 
>   dataengines/comic/comicproviderwrapper.cpp 48ced42 
>   dataengines/comic/plasma-dataengine-comic.desktop f9e5433 
>   dataengines/comic/CMakeLists.txt 8e382e6 
>   dataengines/comic/cachedprovider.cpp caca25e 
>   dataengines/comic/comic.h 8cc3969 
>   dataengines/comic/comic.cpp 7130f44 
>   dataengines/comic/comic_package.h 32be381 
> 
> Diff: https://git.reviewboard.kde.org/r/120276/diff/
> 
> 
> Testing
> -------
> 
> Building from source, compiles 100%, some deprecated warnings. DataEngine shows up in plasmaengineexplorer and detects installed .comic packages.
> This is the initial port, still need to review code to fix issues like whitespaces around ( or the deprecated parts.
> Thanks notmart, d_ed, sebas, bshas etc for helping.
> 
> 
> Thanks,
> 
> Andrei Amuraritei
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140919/f7e465d6/attachment-0001.html>


More information about the Plasma-devel mailing list