[Kde-extra-gear] K3b 0.12.6 released

Thiago Macieira thiago at kde.org
Sat Oct 29 22:32:59 CEST 2005


Sebastian Trueg wrote:
>KURL K3b::convertToLocalUrl( const KURL& url )
>{
>  if( !url.isLocalFile() ) {
>    KIO::UDSEntry e;
>    if( KIO::NetAccess::stat( url, e, 0 ) ) {
>      for( KIO::UDSEntry::iterator it = e.begin(); it != e.end(); ++it )
> { if( (*it).m_uds == KIO::UDS_LOCAL_PATH )
>          return KURL::fromPathOrURL( (*it).m_str );
>      }
>    }
>  }
>
>  return url;
>}

Note that KIO::UDS_LOCAL_PATH isn't defined prior to KDE 3.4.

You have to define it to KIO::UDS_STRING|72 in prior versions.

Your code should be more or less:
#if KDE_IS_VERSION(3,4,91)
  // use KFileItem::localPath or NetAccess::mostLocalURL
#else
# define UDS_LOCALPATH (72 | KIO::UDS_STRING)
  // do the loop Sebastian posted
#endif

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

4. And æfter se scieppend ingelogode, he wrát "cenn", ac eala! se 
rihtendgesamnung andswarode "cenn: ne wát hú cennan 'eall'. Ástynt."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-extra-gear/attachments/20051029/b063e800/attachment.pgp


More information about the Kde-extra-gear mailing list