[Kde-pim] decodeRFC2047String
Ingo Klöcker
kloecker at kde.org
Tue Aug 25 18:29:47 BST 2009
On Monday 24 August 2009, Thomas McGuire wrote:
> Hi,
>
> On Monday 24 August 2009 22:47:24 you wrote:
> > QString decodeMailtoUrl( const QString& url )
> > {
> > QString result;
> > result = KUrl::fromPercentEncoding( url.toLatin1() );
> > result = KMMsgBase::decodeRFC2047String( result.toLatin1() );
> > return result;
> > }
> >
> > is wrong, too ? And it needs to use toUtf8() also ?
>
> fromPercentEncoding() is needed here I think, since it operates on a
> string, and not on a Url which has path(). IIRC it is called when
> passing a mailto from command line.
Hmm. According to lxr.kde.org decodeMailtoUrl() is always called with
url.path() except for MailToURLHandler::statusBarMessage() where it is
(IMO incorrectly) called with url.url().
I suggest to replace the method by a method which takes a KUrl as
parameter. This way any confusion and wrong usage of the method is
avoided.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090825/a8f36ec5/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