[PATCH] KDevCustomProject::runDirectory

Vladimir Prus ghost at cs.msu.su
Mon Jul 11 11:43:03 UTC 2005


Fix a bug and eliminate code duplication in KDevProject::runDirectory.

1. When 'mainprogram' was a simple name (e.g. 'print_pointers') and run
   directory radio value was "executable", the code in
   KDevCustomProject::runDirectory, and many other project kinds,
   would concatenate projectDirectory() with the name of main target.
   That give full paths to executable, not a directory of executable, which
   is needed. For example, for executable e 'foo/print_pointers' we got
   get '/tmp/project/foo', but for executable name 
   'print_pointers' we got '/tmp/project/print_pointers'.
   The fix is trivial.

2. The same runDirectory logic was repeated for most project plugins.
   This patch introduces base KDevProject::defaultRunDirectory, which
   is called from derived class' runDirectory method, with specific name
   of plugin.

Okay to commit?

- Volodya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: runDirectory.diff
Type: text/x-diff
Size: 8703 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20050711/cb53c069/attachment.bin>


More information about the KDevelop-devel mailing list