[Kwintv] Patch to fix memory leak when lirc-support is in

Rizsanyi Zsolt kwintv@mail.kde.org
Wed, 16 Oct 2002 03:10:21 +0200


On Wednesday 16 October 2002 01:22, Richard Moore wrote:
> ----- Original Message -----
> From: "George Staikos" <staikos@kde.org>
> To: <kwintv@mail.kde.org>
> Sent: Tuesday, October 15, 2002 8:34 PM
> Subject: Re: [Kwintv] Patch to fix memory leak when lirc-support is in
>
> > On Tuesday October 15 2002 11:19, Rizsanyi Zsolt wrote:
> > > No it could not go to other place, because it works by calling actions,
>
> and
>
> > > the actions are only defined/available in MainWindow (whose
> > > actionCollection() is initialized by clients/qtvisionactions.h|cpp).
> > > Of course that could be changed (and maybe even should be :), but I
> > > will let that to you :) (I have not yet considered using nor developing
> > > the applet or extension - to be honest I do not understand what would I
> > > gain with them over the application)
> >
> >   This should certainly be possible with the other methods too.  I think
>
> we
>
> > just need to expose this functionality.  Rich?  You're the pro here. :)
>
> Well, it could use the QtVisionActions class directly (it is what this
> class is for!),
> then we could make it use the QtVision class rather than the main window.
> If you like Rizsanyi I can put together the changes for you.

I dont really understand what are you proposing.

What is needed for my lirc implementation is some access to an action 
collection (meaning a string hashmap of actions), so I can invoke those 
actions when an event arrives.
But the QtVisionActions class does not maintain a hashmap. It only fills a 
hashmap on creation.
If you make a hashmap accessible to QtVision class then I can move the lirc 
code to QtVision.

It could be easily done by adding a SetupLirc method to QtVision which takes a 
KActionCollection as parameter.

If you think I can do that easily...

Regards
Zsolt