Qt-DBUS (was: KDE4's IPC)

Thiago Macieira thiago at kde.org
Sun Dec 25 12:49:43 GMT 2005

Olivier Goffart wrote:
>Le Dimanche 25 Décembre 2005 05:30, Thiago Macieira a écrit :
>> I'd probably go with option #1, which in turn leads me to the
>> conclusion that the parser for the .h is moc itself. That's one less
>> parser to run!
>That mean that each DBUS interface should inherits from QObject
>for now, the abstract class  KIMIface doesn't inherit from QObject.
>That allow some stuff like
>class FooApplication : public KApplication,  public KIMIface
>Anyway, it's not a real problem, since it easy to design the application
> to not have such double inheritance

I've been thinking about that too. The way I see it, it's the only way to 
use moc to parse the class and generate the necessary data on it.

Our options are:

1) write the interface inheriting from QObject
- easier to write (mostly done already)
- can be parsed from moc
- cannot be fully inline, due to _EXPORT restrictions (that is, it has to 
belong to at least one library). In fact, I doubt the .h file containing 
the QObject-derived definition can be installed at all.
- the object implementing this interface can only have one interface
- it has to derive from this interface and none other (cannot do your 
FooApplication above)
- the skeleton class won't inherit the interface definition, it'll 
reimplement it!

2) write the interface without inheriting from QObject
To do this, we'd have to throw away the current bindings and start from 
the scratch, since the base object won't be a QObject anymore and cannot 
benefit from the Qt Meta Object system.

Unless you want us to start over, the FooApplication above will have to be 
modified so that, instead of inheriting KIMIface itself, it'll have an 
object that does.

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051225/21d79da9/attachment.sig>

More information about the kde-core-devel mailing list