[Kde-pim] KPIMIdentities::IdentityManager deprecated methods
Ingo Klöcker
kloecker at kde.org
Sat Oct 6 23:33:42 BST 2007
On Saturday 06 October 2007, David Jarvie wrote:
> On Friday 05 October 2007 00:35:49 Ingo Klöcker wrote:
> > On Thursday 04 October 2007 01:43, David Jarvie wrote:
> > > KPIMIdentities::IdentityManager::identityForName() is deprecated
> > > (and apparently has been for a long time). What method should be
> > > used instead?
> >
> > KPIMIdentities::IdentityManager::identityForUoid()
> >
> > The name of an identity can be changed by the user but the
> > numerical ID will always stay the same. Therefore identities should
> > always be identified by their ID and never by their name.
>
> I've now marked this and 3 other methods as KDE_DEPRECATED. But I
> think that KPIMIdentities::IdentityManager::identityForName() is
> actually necessary, since there are circumstances when it is
> reasonable to convert from a name to a uoid - for example, when
> converting old config files. Perhaps a better solution would be to
> add a new method IdentityManager::uoidForIdentityName(). This would
> allow for the case I mention, without being quite so tempting to use
> in deprecated ways.
>
> This would be best added by tomorrow if possible, to be in time for
> the KDE development system tagging.
>
> Do you agree?
No, I object to adding this method. As you said it is only needed for
upgrading old config files. Nobody should assume that identities can be
identified by their name and therefore IMO we shouldn't make it too
easy to get the identity belonging to a certain name. If somebody still
wants to do this (e.g. for upgrading) then he can simply iterate over
all identities.
BTW, upgrading old config files will probably anyway be done by some
perl scripts or some special-purpose minimal KDE apps which shouldn't
use the deprecated methods so that they will still work after the
methods have been removed. So I don't see a reason to keep those
deprecated methods (which are deprecated since several version of KDE
3.x). But I guess now it's too late to remove them. :-( I really hope
we don't have to support this cruft until KDE 5.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20071007/674f4ff4/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list