From kde-devel Mon Jun 24 19:17:55 2002 From: Simon Robins Date: Mon, 24 Jun 2002 19:17:55 +0000 To: kde-devel Subject: Re: ioslaves X-MARC-Message: https://marc.info/?l=kde-devel&m=102494929600344 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 shel= l > > > > 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=20 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 standa= rd=20 kdevelop template (which I used as a starting point) for ioslave developm= ent=20 not emitting the mimetype as the first thing done.=20 This has lead to several hours of puzzling for me why stat() is never eve= n=20 called! Also changing anything in the .h file of the proj seemed to crash the app= , but=20 I'm sure you guys are on top of that!=20 >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<