[RFC] Need for a new KIO slave error: "unsupported file format"

David Faure faure at kde.org
Wed Jun 22 16:49:17 BST 2005


On Wednesday 22 June 2005 16:36, Nicolas Goutte wrote:
> On Wednesday 22 June 2005 16:25, David Faure wrote:
> > On Wednesday 22 June 2005 16:05, Nicolas Goutte wrote:
> > > I would need a "unsupported file format" for a KIO slave.
> > >
> > > So probably a new value should be added to kdelibs/kio/kio/global.*. My
> > > question is how should it be labeled to avoid to have an error message
> > > that has a too narrow use.
> > >
> > > I propose ERR_UNSUPORTED_FILE_FORMAT with
> > > "Unsupported file format.\n%1"
> >
> > I don't really object, but I wonder what do we really gain from it,
> > compared to using ERR_SLAVE_DEFINED and shipping the complete error message
> > with it?
> 
> The problem is that it is in kdebase. So it needs its own .pot file and then 
> to ensure that the right catalogue file is loaded at runtime. As I do not 
> really know how much complex this way would be, I thought that adding a new 
> message code would be easier.

We do this just fine in all other kioslaves, I don't think this is reason enough
for adding code to kdelibs. Just add a messages target to kdebase/kioslave/tar/Makefile.am

> As for what an application could do with ERR_UNSUPORTED_FILE_FORMAT, well, i 
> do not know, Probably most applications will drop the error code anyway and 
> simply display "Could not open file %1" without passing the KIO error.

Yes, this is why ERR_SLAVE_DEFINED is enough.

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