[Development] [Feature] Q_INFO: Annotations for classes, methods, properties and enums

Olivier Goffart olivier at woboq.com
Wed Sep 11 16:56:45 CEST 2013


On Wednesday 11 September 2013 07:41:03 Saether Jan-Arve wrote:
> I think "foo" = "bar" is easier to read.
> Why not use the same syntax for the regular Q_INFO annotations too:
> Q_INFO("foo" = "bar")
> 
> I also think that the name Q_INFO is way too generic (everything in a source
> file is information, so it's just redundant). I would therefore prefer to
> just use Q_ANNOTATE.
> 
> My last suggestion is to remove the quotes around the key. Having the key
> without quotes makes it fit in better with the rest of the information in
> the Q_PROPERTY macro. So summarizing my three suggestions we'd get:
> Q_ANNOTATE(foo = "bar")
> and
> Q_PROPERTY( ... ANNOTATE foo = "bar")
> 
> In my mind, this is more readable.

I actually like the "ANNOTATE" name much better than Q_INFO

-- 
Olivier

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org




More information about the Development mailing list