KUser windows port and small API changes
Simon Hausmann
hausmann at kde.org
Mon Sep 24 18:54:30 BST 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070924/126afdc0/attachment.sig>
More information about the kde-core-devel
mailing list