[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KUser windows port and small API changes
From: Simon Hausmann <hausmann () kde ! org>
Date: 2007-09-24 17:54:30
Message-ID: 200709241954.33830.hausmann () kde ! org
[Download RAW message or body]
On Monday 24 September 2007 19:18:54 Oswald Buddenhagen wrote:
> On Sun, Sep 23, 2007 at 01:40:59AM +0200, Bernhard Loos wrote:
> > +++ kuser.cpp (working copy)
> > + /**
> > + * Retruns an extended property or an invalid
>
> spelling
>
> > + * QVariant if the property is not set.
> > + *
> > + * currently supported properties: roomnumer, workphone and homephone
> > + *
>
> "Supported properties on UNIX: @c roomnumer, @c workphone and @c homephone.
> Under Windows, no extended properties are supported currently."
>
> > + * \return a QVariant with value of the property
>
> please use @ consistently.
> actually, i prefer to document the "failure" case here and take out the
> "or invalid", etc. from the description above. oh, well ...
>
> > + */
> > + QVariant extendedProperty(const QByteArray &which) const ;
>
> stray space.
>
> other than that, the patch is pre-approved by me and will go in today
> unless somebody cries out *now*.
I suggest to use a type-safe (and faster) enum instead of a string as key. I
also suggest "extra" as prefix instead of "extended". Or maybe
just "property".
int room = user.extendedProperty("roomnumber").toInt();
vs.
int room = user.property(KUser::RoomNumber).toInt();
Simon
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic