[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: A New Krazy Checker for Classes Requiring Q_OBJECT
From: "Thiago Macieira" <thiago () kde ! org>
Date: 2007-05-11 9:46:35
Message-ID: 1130.172.26.0.1.1178876795.squirrel () 172 ! 26 ! 0 ! 1
[Download RAW message or body]
Tom Albers said:
> At Friday 11 May 2007 01:05, you wrote:
>> Tonight's Krazy run will start looking for QObject derived classes
>> that are without the Q_OBJECT macro. This new checker was written
>> by Thorsten Roeder.
>
> I thought that was only needed when there are signals or slots?
>
> Toma
The test only checks direct derivation from QObject. If you don't need any
of the Meta Object features (properties, signals, slots, enums, className,
qobject_cast, the meta object itself, etc.) why are you deriving from
QObject in the first place? :-)
QObjects are heavy: if you don't need any of those features, you shouldn't
derive from it.
Arguably, there might be a reason to derive in the QObject hierarchy
without including a Q_OBJECT macro, for instance to access a protected
member function, etc. But I don't believe it exists for direct QObject
derivation.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic