[mythtv] [patch] comboboxsetting causes segfault

Kenneth Aafl°y ke-aa at frisurf.no
Tue Mar 9 22:08:20 EST 2004

On Wednesday 10 March 2004 03:31, Matt Zimmerman wrote:
> On Wed, Mar 10, 2004 at 03:15:55AM +0100, Kenneth Aafl?y wrote:
> > On Wednesday 10 March 2004 03:00, Matt Zimmerman wrote:
> > > I intentionally avoided keeping references to any widgets in the
> > > setting class; I think this would all work much better if it worked the
> > > other way around, and the widget connected to a signal on the setting
> > > which would be emitted if something changed.
> >
> > So all widgets should be aware of their higher level settings?
> No; they don't have to be, with signals and slots.  configWidget() would
> connect the appropriate signals and slots, and that would be it.

Guess i should not have read your statement litteraly, as it implies that the 
widget connects to a signal on the setting...

> > I see another point of failure (i belive), and that is that if a
> > subclassed comboboxsetting or listboxsetting adds items in it's
> > constructor, they will not be sendt to the widget because the widget is
> > not around yet.
> That's a non-problem; when the widget is instantiated, it is populated with
> the current list of selections.  The problem that was solved by storing a
> pointer to "the" widget (which is actually just the most recent one if
> there is more than one, and will be overwritten if another is instantiated
> before the previous one is destroyed) was how to add new selections to an
> existing widget if they were added to the setting.

I can't see where the filling of the widget is done. Are you sure that this 
feature exists, or do you assume that it does, because most settings get 
filled on db load, and not within the constructor?


ke-aa at frisurf.no

More information about the mythtv-dev mailing list