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

Lubos Lunak l.lunak at suse.cz
Tue Jun 14 10:33:09 CEST 2005


On Tuesday 14 of June 2005 00:37, Aurelien Gateau wrote:
> Le Lundi 13 Juin 2005 17:24, Renchi Raju a écrit :
> > On Mon, 13 Jun 2005, Lubos Lunak wrote:
> > > The attached patches implement delayed loading of KIPI plugins in
> > > Gwenview and a small API change in KIPI needed for that (plus it
> > > depends on a recent KAccel change I did today in kdelibs). The API
> > > change is just making KIPI::PluginLoader::loadPlugin(
> > > KIPI::PluginLoader::Info* ) public, plus increasing the version number
> > > in order to be able to detect this (I don't actually care about the
> > > actual version number). Are the changes ok with you?
> >
> > 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.

 Is the new version number 0.1.2 ok with you?

> > initializing the pluginloader does ktrader scanning for available
> > plugins, as you might have seen already

 That's rather cheap actually. On this Athlon XP 2800+ machine it's about 
550ms vs 15ms without and with the patch.

>
> I agree with Renchi, especially since the fix will only benefits KDE 3.5
> users :-/.

 It builds also with older KDE versions, and, well, if one wants to run the 
best version that usually has to be also the latest version. I cannot change 
this for older KDE versions, and I don't know how to get the same 
functionality without the KAccel change. Although, actually, I could check if 
any shortcut is actually configured. Maybe if I get bored.

 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.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/


More information about the Kde-imaging mailing list