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

List:       kde-core-devel
Subject:    Re: API robustness - (was: Different ways to create a directory)
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2009-08-14 9:16:37
Message-ID: 20090814091637.GA19204 () neo ! apaku ! dnsalias ! org
[Download RAW message or body]

On 14.08.09 11:11:40, Rafael Fernández López wrote:
> On Friday 14 August 2009 10:14:53 David Faure wrote:
> > You can't solve every problem around the house with a hammer,
> > there are different tools for different purposes.
> 
> True enough, but I don't think 5 different methods for creating a directory 
> are justified. Please note that the basic 'redundancy' with Qt cannot be 
> removed, since even if we had only one mkdir method we would have QDir::mkdir 
> and KFoo::mkdir (if that was the only mkdir method on KDE).
> 
> However, in this very case I think KIO, NetAccess and QFile are enough for 
> every purpose. If needed, they can be added flags.
> 
> I think I am going to create a techbase page for API users to write this kind 
> of issues, so we can get them fixed for KDE 5. I hope I can have enough time 
> for KDE 5, since this kind of things is one of my priorities...

I agree here, I don't see a reason why an app developer should need to care
wether the KUrl which he wants to use to create a directory is a remote or
local one. The KFoo::mkdir function should "just work" in either case,
hence using kio if its a remote url or QFile::mkdir for a local one. 

It may be justified to have a KStandardDirs::mkdir( <type>, "dirname" ) to
easily create a directory within one of the various standard dirs as
convenience function.

Andreas
 
-- 
You will be the victim of a bizarre joke.
[prev in list] [next in list] [prev in thread] [next in thread] 

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