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

Nicolas Goutte nicolasg at snafu.de
Wed Jun 22 19:15:50 BST 2005


On Wednesday 22 June 2005 17:49, David Faure wrote:
> 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

Thank you! That was the step that I had missed.

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

Yes, indeed it is enough.

Have a nice day!





More information about the kde-core-devel mailing list