[mythtv] [Patch] (alpha) Update to Kenneth's DVB Channeleditorpatch

John Pullan jmp at tarantella.com
Wed Dec 31 06:24:46 EST 2003


On Tue, 2003-12-30 at 20:37, Isaac Richards wrote:

> >
> > Not entierly correct, as the moc touches every file that contains
> > a class witch is a Q_OBJECT. If this class is contained in a
> > .cpp file, you must include the generated moc at the bottom of the
> > file. And in this patch, I've done that to videosource.cpp.
> 
> Ah, right.  Any reason the entire class has to be ifdef'd out?
> 
> > Are you sure that you regenerated the moc after putting the
> > protecting #ifdefs in (I can't belive the moc beeing that stupid)?
> 
> It's probably not regenerating.
> 
This is starting to bug me. As far as I can tell, moc is that dumb. It
just seems to grab every Q_OBJECT in a file (h or cpp) and generate it's
stubs. 

The problem comes when it generates code which uses a typedef which is
no longer defined e.g DVBStatusLabel::set(fe_status_t s) which then
barfs when it comes to compile time.

I think what I'm going to do is put in a dummy typedef for fe_status_t
when it's not being compiled in normally and ifdef out the
implementation of set(). A bit ugly, but probably the best looking
option I've come up with.

Cheers

-- 
John Pullan <jmp at tarantella.com>



More information about the mythtv-dev mailing list