From kde-devel Tue Jun 25 07:48:51 2002 From: Simon Hausmann Date: Tue, 25 Jun 2002 07:48:51 +0000 To: kde-devel Subject: Re: ioslaves X-MARC-Message: https://marc.info/?l=kde-devel&m=102499147309045 On Tue, Jun 25, 2002 at 09:09:37AM +0200, David Faure wrote: > On Monday 24 June 2002 21:17, Simon Robins wrote: > > 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! > > Who's in charge for the KDevelop templates? Can this be fixed? > > [Why are those templates still in .tar.gz form in CVS? If they were not, > and the tarballs were done at "make" time, I could fix this kind of thing easily. > With targzs it's just too easy to make mistakes.] The good thing is that in gideon they are not anymore :) kdevelop/parts/appwizard// . Simon >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<