KDevelop custom tools bugfix and extension

Markus Kuehni markus.kuehni at trilab.ch
Thu Nov 1 10:31:22 UTC 2001


Hi

Bug: Tools dialog does not save arguments string.

Reason: a QStrList containing empty strings is written (into config) as an
empty string.

Solution: either change QStrList (dangerous) or check for empty argument
strings and save a dummy space character instead (patch attached). The dummy
space character will be ignored by the shell.

Extension: I'd like to integrate a custom tool that takes the currently
selected word (in the editor) as an argument.
I've seen there is (undocumented) %H, %S and %D macro substitution in the
tools arguments already. I have exteded these to include the currently
selected word (%W) and text (%T).

The latter should probably be shell-escaped and put in quotes. I'm sure
there is a lib call for exactly that (but I haven't got a clue).

I've still got a wish: Add custom tools (or at least the first 5 or so) to
the keyboard accelerator config ;-)

-- Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ckdevelop.cpp.patch
Type: application/octet-stream
Size: 1858 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20011101/72799525/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctoolsclass.cpp.patch
Type: application/octet-stream
Size: 1257 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20011101/72799525/attachment-0001.obj>


More information about the KDevelop-devel mailing list