[Gwenview-general] Re: [Kde-imaging] KIPI initialization

Renchi Raju renchi at pooh.tam.uiuc.edu
Tue Jun 14 17:46:48 CEST 2005



On Tue, 14 Jun 2005, Lubos Lunak wrote:

> On Tuesday 14 of June 2005 00:37, Aurelien Gateau wrote:
>> Le Lundi 13 Juin 2005 17:24, Renchi Raju a écrit :
>>>
>>> looks fine. though, i think you will gain better startup speeds by doing
>>> a delayed initialization of the pluginloader instance itself.
>
> That however disables the plugins completely. In Gwenview it's possible to
> assign keyboard shortcuts to KIPI plugins, and theoretically it should be
> also possible to have toolbar icons for them. That wouldn't work with delayed
> initialization of the pluginloader itself.

i fail to understand why not. do a delayed initialization of the 
pluginloader and when the plugins are loaded, assign them keyboard 
shortcuts and/or toolbar icons. in any case the actions for the plugin 
actions are not instantiated unless you load the plugin, so i don't see 
how you can assign keyboard shortcuts/icons to them before that.

> Is the new version number 0.1.2 ok with you?

that should be fine.

> BTW, there's one more thing I wanted to ask about KIPI. The documentation is
> rather scarce, and I wonder about what exactly KIPI::Plugin::setup() is for.
> It seems to be the "real" constructor for the object, it creates all the
> KAction's etc., however the example in pluginloader.cpp actually calls it
> repeatedly (once per slotReplug() being called, but this function may be
> called repeatedly). This leads to repeated creation of KAction's and their
> leaking.

you are right. in digiKam, we do the setup of the plugins only once and 
get a list of actions and plug them into widgets wherever needed. but 
there is indeed memory leak associated with the setup being called 
multiple times. i will have a look at this.

renchi


More information about the Kde-imaging mailing list