[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdepim/kmail
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2003-10-05 21:06:05
[Download RAW message or body]


On Sunday 05 October 2003 20:40, Simon Hausmann wrote:
> On Sun, Oct 05, 2003 at 07:25:37PM +0200, Ingo Klöcker wrote:
> > @@ -134,11 +137,19 @@ int KMailApplication::newInstance()
> >    for(int i= 0; i < args->count(); i++)
> >    {
> > -    if (!to.isEmpty())
> > -      to += ", ";
> >       if (strncasecmp(args->arg(i),"mailto:",7)==0)
> > -       to += args->url(i).path();
> > +      to += args->url(i).path() + ", ";
> > +    else {
> > +      QString tmpArg = QString::fromLocal8Bit( args->arg(i) );
> > +      KURL url( tmpArg );
> > +      if ( url.isValid() )
> > +        attachURLs += url;
>
> It's probably better to use
>
> KURL url( args->url( i ) );
> if ( url.isValid() )
>    ....
>
> instead, as KCmdLineArgs::url (or makeURL in particular) has sugar
> like handling absolute and relative paths nicely, in additional to
> generic urls. (calling QFile::encodeName properly and handling
> paths relative to the current working directory) .
>
> Just a thought :)

Thanks for the suggestion, but that's not what we want because then even 
email addresses would be interpreted as URLs. But we want only real 
URLs to be treated as URLs. Everything else should be interpreted as 
email address.

Regards,
Ingo

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic