Inconsistency between sample app and kde web site

Alan Chandler alan at
Sun Dec 15 11:31:39 GMT 2002

Hash: SHA1

Using gideon (from CVS from 9th December) I created a simple kde app.

I am using gcc-3.2, and it fails to build, siting a problem with the view 
class - thus

 /home/alan/kbooked/src/kbookedview.cpp: In constructor   
`kbookedView::kbookedView(QWidget*)': /home/alan/kbooked/src/kbookedview.cpp:19: 
type `class DCOPObject' is not a   direct or virtual base of `kbookedView'

Since I using this to learn about kde - I went to the web site to find out 
what was happening with DCOPObject.  In the example there ( 
)they quote

"Alter the inheritance of this class such that it virtually inherits from 
MyInterface. Then add declarations to your class interface similar to those 
on MyInterface.h, but virtual, not pure virtual. 


class MyClass: public QObject, virtual public MyInterface
  Q_OBJECT ...."

The code for this as created by gideon is 

class kbookedView : public QWidget, public kbookedIface

I checked back on kdevelop cvs for the template that created this and found 
the last change to this template made a few days ago by David Faure has the 
following comment.

"Amazing how one mistake long ago can propagate that much. Do _not_ use
virtual inheritance for DCOPObjects. It makes it very hard to pass a name
to the DCOPObject constructor - and there's no reason to use virtual 
here anyway."

And the change is to take the "virtual" out of the class definition.

So there seems to be some inconsistency here.  [I assume that there is a 
problem with the web site example if David's comment is correct - but since I 
don't know enough to even fix my compile problem, who am I to say - I just 
thought someone should know]

I would also like some advice as to why my app fails to compile.

- -- 
Alan Chandler
alan at
Version: GnuPG v1.2.1 (GNU/Linux)


to unsubscribe from this list send an email to kdevelop-request at with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list