[Patch] KUrl::prettyUrl and xmpp: url
Olivier Goffart
ogoffart at kde.org
Mon Oct 8 15:37:53 BST 2007
Le lundi 8 octobre 2007, Hans Meine a écrit :
> Am Montag, 08. Oktober 2007 14:39:09 schrieb Olivier Goffart:
> > Le lundi 8 octobre 2007, Thiago Macieira a écrit :
> > > Olivier Goffart wrote:
> > > >So do you suggest me to fix pathOrUrl() (and his documentation)
> > > >Or do I commit the previous patch ?
> > >
> > > Yes, fix pathOrUrl() if it's being used for machine-to-machine.
>
> The problem seems to be that it is sometimes used for m-to-m, sometimes for
> prettifying URLs for the UI.
>
> > Well according to pathOrUrl() is mostly used for display to the user, as
> > the documentation say it.
> >
> > I don't think KRun should use pathOrUrl.
> >
> >
> > but either url() as in my patch,
> > or
> > (url.isLocalFile() && url.fragment().isNull() &&
> > url.encodedQuery().isNull())? url.toLocalFile() : url.url();
>
> This cries for two versions of pathOrUrl, doesn't it? Or prettyUrl() with
> some argument.. or prettyUrlOrPath() (which I would like if the order
> wasn't inconsistent with pathOrUrl()).
The problem is that the most of the current codebase already use pathOrUrl for
display. According to lxr.kde.org , there is 300 reference of it.
It's a bit late to change the meaning of it.
I think that all theses method make a confusing API anyway.
-------------- 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/20071008/d5c390f4/attachment.sig>
More information about the kde-core-devel
mailing list