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

List:       kde-core-devel
Subject:    Re: name() method of KFileItem
From:       Michael Brade <Michael.Brade () informatik ! uni-muenchen ! de>
Date:       2001-09-13 9:07:38
[Download RAW message or body]

On Thursday 13 September 2001 10:53, David Faure wrote:
> On Jeudi 13 Septembre 2001 10:24, Michael Brade wrote:
> > On Wednesday 12 September 2001 23:30, Julian Rockey wrote:
> > > Also it raises the question of KFileItem - I still think a 'clean' way
> > > of doing things would be for KFileItem to analyse the UDSEntry it gets
> > > given and shuffle things around so that it only returns the leaf name
> > > in its name() method.
> >
> > Hmm, this make sense IMHO. If nobody objects I'll make KFileItem move the
> > relative path of UDSEntry to the end of m_url so that m_strName and
> > m_strText only contain the real name.
>
> Well there is a performance issue here. In the normal case (listing a
> directory, not recursively), this is going to add a search for '/' in each
> and every filename.
Good point, since this would make e.g. KDirLister quite slow... I'll do some 
tests first.

> OTOH I agree that KFileItem's main purpose is to make the API easier to use
> (compare the UDSEntry stuff with KFileItem's methods), and this fits into
> "making it easier to use for the application". I'm only concerned about the
> possible slowdown. Maybe a bool could be passed as constructor parameter
> (checkNameForRelativePathBecauseIUsedListRecursive, or any smaller name
> you ilke ;).
I like it ;)

Ciao,
  Michael

-- 

       Some operating systems are called `user friendly',
             Linux however is `expert friendly'.

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

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