REMINDER: Final review of VCS interfaces

Andreas Pakulat apaku at gmx.de
Fri Jun 1 19:59:14 UTC 2007


On 01.06.07 21:40:47, Robert Gruber wrote:
> 
> On Fri, 01 Jun 2007 20:56:57 Robert Gruber wrote:
> > On Fri, 1 Jun 2007 18:38:42 Andreas Pakulat wrote:
> > > > Deriving CvsJob from both our VcsJob interface-class and KJob isn't
> > > possible. 
> > > > 
> > > > You cannot inherit from two QObject subclasses:
> > > > [ 35%] Generating cvsjob.moc
> > > > /home/kdedev/src/kdevelop/lib/plugins/vcs/cvs/cvsjob.h:87: Warning:
> > > Class CvsJob inherits from two QObject subclasses VcsJob and KJob. This
> > is not
> > > supported!
> > > > 
> > > > So I also vote for deriving VcsJob from KJob.
> > > 
> > > Apart from the fact that I wanted to do that anyway: Why is VcsJob a
> > > QObject subclass? Who added that? I guess thats local on your hdd right
> > > (its not in svn). 
> > 
> > 
> > Well, I was wondering about that too. But it definitely has nothing to 
> > do with other changes I made to my local copy. 
> > 
> > I took a fresh KDevelop checkout and just applyed the changes from the 
> > attached patch-file and got the same error.
> 
> 
> OK, now I'm completely confused!?!?!
> 
> I played around a bit, and it seams the error is related
> to the order in which I inherit VcsJob and KJob.
> 
> While moc seams to crack up with this:
> class CvsJob : public KDevelop::VcsJob, public KJob
> 
> everything is fine if I just switch the two subclasses to this:
> class CvsJob : public KJob, public KDevelop::VcsJob
> 
> Anybody knows or can imagine the reason for this behavior?

:) I just sent my reply. See QObject docs for the why, any QObject
subclass (direct or indirect through another class) needs to inherit
QObject (or the QObject-derived-class) first, else the whole meta object
system doesn't work.

Andreas

-- 
Everything that you know is wrong, but you can be straightened out.




More information about the KDevelop-devel mailing list