QObjects on interfaces

Aleix aleixpol at gmail.com
Thu Jul 24 22:19:01 UTC 2008


Hi kdevelopers,

I know it is a discussion that has raised sometimes on the IRC and on the
hackaton but it is something important enough to be discussed here.

As you might know, I'm working on the KDevPlatform Kross support and, for
Kross it is necessary that an Object, to be recognized, inherits a QObject
to retrieve the methods it has.

When I have a non-QObject class, I have 2 alternatives if I want it to be
called from a script:

make it a QObject (as I did in the patch attatched)
-or-
make a wrapper as I did in kross/projectitemadaptors.h

I think it is much better to get it from the QObject because we don't
duplicate any code but I also understand that in cases where it is just
heavy to use a QObject so...

Note: the attatched patch is just an example of how things change when I
make it QObject, I don't mean it is the only cases I need that.

Any thoughts?

Thank you,
Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080725/0b48e253/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdev_qobjects.patch
Type: text/x-diff
Size: 8083 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080725/0b48e253/attachment.bin>


More information about the KDevelop-devel mailing list