[Kwintv] crash in QtVision::SetChannel
Richard Moore
kwintv@mail.kde.org
Sun, 27 Oct 2002 18:16:50 +0000
Rizsanyi Zsolt wrote:
>
> On Sunday 27 October 2002 01:54, Dawit A. wrote:
> > > I see some possible solutions to this:
> > > 1) remove this previous channel thing - it is only used for dcop if I
> > > understand it correctly, and I dont see for what it is good for
> >
> > No, do not do that. It is very simple to fix this problem. FWIW, the
> > _prevChannel is a feature that allows you to go back to the previous
> > channel by pressing one configurable shortcut key. By default this is
> > Key_L. This is the same feature available on many TV sets/Remote
> > controls as go back, Last, recall, previous etc...
>
> I did not know about that feature.
>
> > > 3) take care to do '_chan = NULL' when the channel store is deleted (or
> > > that exact channel is deleted) -- this may be impossible
> >
> > And why is this impossible ? Channel is a QObject. All one has to do is
> > connect to its destroyed signal and reset the local pointer accordingly.
>
> I'm not that proficient in Qt programming yet... :)
In this case I suspect the easiest answer is just to use a
QGuardedPointer,
that way it will automatically become 0 when required.
Rich.