Moving KPart args from QStringList to QVariantList

koos vriezen koos.vriezen at gmail.com
Fri Mar 2 20:35:13 GMT 2007


2007/3/2, Matt Broadstone <mbroadst at gmail.com>:
> On 3/2/07, koos vriezen <koos.vriezen at gmail.com> wrote:
> > Hi,
> >
> > 2007/3/2, Matt Broadstone <mbroadst at gmail.com>:
> > >   In plasma we've run into a situation where we'd like to cache the
> > > KService::Ptr for a given applet in the applet itself, and it seems
> > > the only way to do this is to pass it along to the applet factory by
> > > means of args, however args is a QStringList.
> > >   I was wondering if anyone would be averse to me switching this
> > > QStringList to a QVariantList so we can pass the ptr in - the change
> > > should be more or less transparent for current code. The change
> > > probably qualifies for a bc monday commit so if I get the go ahead I'd
> > > like to commit the change this monday.
> >
> > Just a silly suggestion, have you considered to add a small cache on
> > the client side of the service type lookup?
> >
> > Koos
> >
> Yes I had considered this, but as Aaron mentioned when we were
> discussing it this is just moving the bloat/problem elsewhere. It wold
> be very nice if we could reuse the service pointer we get when we are
> already making a call to syscoca. I imagine there are other use cases
> for being able to pass other types of info to a part.

Well I only now of kparts wrt to konqueor plugins (btw I hope web pages
aren't able to pullin whether plasmoids in the future :-), ie. aren't kparts
abused now).

I can't oversee if small cache is a bigger bloat that moving to QVariants,
Did make me wonder why there isn't such a cache right now, eg. in
konqueror it's not so uncommon certain mimes are looked up often in a
small amount of time

So kparts should then check this lists to see if it recognizes a certain type,
don't see a problem from my stand point.

Koos


>
> Matt Broadstone
>
>
> > > Matt Broadstone
> > >
> >
>




More information about the kde-core-devel mailing list