KIO::NetAccess static methods question

David Faure faure at kde.org
Mon Oct 22 17:49:49 BST 2007


On Monday 22 October 2007, Rafael Fernández López wrote:
> Hi all,
> 
> I wonder why the API to KIO::NetAccess does not provide in general (in almost 
> all methods) a last parameter (JobFlags flags). This would prevent, for 
> example in some situations from registering the jobs in the tracker if not 
> wanted.

... and in that situation you can just create the job with the KIO::foo() API
and call NetAccess::synchronousRun() or job->exec().
For this reason, many NetAccess calls have been deprecated, and IMHO
even more should be. There's no point in duplicating the entire Job API
again in NetAccess, when we can just use the Job API in the first place,
in combination with synchronousRun or exec.
The only thing in NetAccess that still makes sense, apart from synchronousRun,
is download+removeTempFile since this takes care of the tempfile handling,
and exists() because it's easier to use than stat. But in those cases the idea was:
not providing a way to hide the progress dialog because it only shows up after
a few seconds anyway, i.e. when the operation is starting to take too long,
and in those cases we do want to show a progress dialog -- remember that the
application is not responding while it's stuck in NetAccess...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list