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

List:       kde-devel
Subject:    Re: ioslaves
From:       Simon Robins <simon.robins () OrbisUK ! com>
Date:       2002-06-24 19:17:55
[Download RAW message or body]

On Wednesday 12 June 2002 18:00, David Faure wrote:
> On Wednesday 12 June 2002 18:40, Simon Robins wrote:
> > On Monday 10 June 2002 22:44, aleXXX wrote:
> > > > I wrote a trivial ioslave for KDE 2 which executed arbitrary shell
> > > > commands. e.g kmd:/ps aux|grep myuser
> > > > and put the output into whatever document you were using.
> > > >
> > > > I've tried running this in konqueror for KDE3 and things aren't
> > > > working quite as expected.
> > > >
> > > > A URL such as kmd:/ps seems to send konqueror into a spin never
> > > > returning. However the ioslave's get method is being called, but it
> > > > never seems to emit its data (Also interestingly this still works in
> > > > kedit)
> > > >
> > > > The same thing happens for URLs such as kmd://blah/foo but not if you
> > > > put on a following slash (ie kmd://blah/foo/)
>
> This means you need to implement stat(). When the URL doesn't end with a
> slash, kde doesn't know what type of file it is - so it calls stat().
> Make sure to also call mimeType() as the first thing in get().
> In fact get() should be called most of the time, even from e.g. minicli,
> now ... but it _needs_ the mimetype to be emitted.

The problem turned out to be due to not emitting the mimetype. Thanks for your 
help, its not entirely obvious that would cause that particular problem.

I don't know if this is the forum to make some comments about kdevelop:
Firstly this mimeType bug was largely not spotted by me due to the standard 
kdevelop template (which I used as a starting point) for ioslave development 
not emitting the mimetype as the first thing done. 

This has lead to several hours of puzzling for me why stat() is never even 
called!

Also changing anything in the .h file of the proj seemed to crash the app, but 
I'm sure you guys are on top of that! 



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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