Patch to have krun correctly handle scripts.

David Faure faure at kde.org
Fri May 7 17:32:05 BST 2004


On Friday 07 May 2004 17:15, Ian Reinhart Geiser wrote:
> On Friday 07 May 2004 10:32 am, Waldo Bastian wrote:
> > That would then also make it easy for applications like kate to give
> > application/x-executable-script a higher priority than text/plain
> wow.
> 
> here is the updated patch set.
> 
> a) added x-executable-script with X-KDE-IsAlso=text/plain set
> b) changed ruby,python,perl,javascript and shell to 
> X-KDE-IsAlso=application/x-executable-script
> c) changed the code to check the mimetype and execute bit.

[You should call KMimeType::mimeType() only once and store the result into 
a KMimeType::Ptr to avoid calling it twice, but OTOH this code is hardly
performance critical :)]

Please turn isExecutableFile into a KRun public method, and I'll adjust
Konqueror accordingly.

I like Waldo's idea a lot.

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