[Kde-extra-gear] K3b 0.12.6 released

Sebastian Trueg trueg at k3b.org
Sat Oct 29 22:17:22 CEST 2005


Sure. :)
Here is the code snippet I use:

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;
}

On Saturday 29 October 2005 21:48, Koos Vriezen wrote:
> On Sat, Oct 29, 2005 at 07:37:24PM +0200, Sebastian Trueg wrote:
> > ok, answering my own stuff. :)
> > thanks for the hint. Now it's done the right way. :)
>
> Care to share this with us?
> Obviously, apps. like kmplayer needs this too, and I just now read about
> a way to get this info. However, I only can find the
> KIO::NetAccess::stat and a 3.5 more conveniant one. However these two do
> more than just resolving the UDS name, like figuring out the existence
> of an url async using enter_loop().
> Also one might expect that KURLRequester and KCmdLineArgs would offer an
> UDSEntry next to KURL.
> So I guess I overlook something more direct ..
>
> > On Saturday 29 October 2005 19:10, Sebastian Trueg wrote:
> > > On Saturday 29 October 2005 17:41, Thiago Macieira wrote:
> > > > Sebastian Trueg wrote:
> > > > > * Support for media:/ urls.
> > > >
> > > > Does that include support for system:/media/ as well?
> > > >
> > > > In other words, did you hardcode "media" or did you add code to find
> > > > the UDS_LOCAL_PATH atom?
> > >
> > > media is hardcoded. What am I suppsed to do instead? Not check the
> > > protocol but do something like:
> > >
> > > if( !url.isLocalFile() ) {
> > > KIO::NetAccess::stat( url, ... );
> > > if( statthingi.contains( UDS_LOCAL_PATH )
> > > // do someting
> > > }
> > > _______________________________________________
> > > Kde-extra-gear mailing list
> > > Kde-extra-gear at kde.org
> > > https://mail.kde.org/mailman/listinfo/kde-extra-gear
> >
> > _______________________________________________
> > Kde-extra-gear mailing list
> > Kde-extra-gear at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-extra-gear
>
> _______________________________________________
> Kde-extra-gear mailing list
> Kde-extra-gear at kde.org
> https://mail.kde.org/mailman/listinfo/kde-extra-gear


More information about the Kde-extra-gear mailing list