Adding QtDesigner custom widget plugin for KConfigXT

Adam Treat treat at kde.org
Wed Jul 11 02:06:26 UTC 2007


On Tuesday 10 July 2007, Andreas Pakulat wrote:
> Right, and thats exactly why plugins need to be able to have their own
> environment setting.

So let them have them!

> > With my solution it is unambiguous and clear.  The developer need only
> > look in *one* place and he can expect that all processes or plugins will
> > adhere to this.  If he needs to change something or open a new 'shell'
> > he/she can do so in an easy and straightforward manner.
>
> Thats just not going to work, IMHO. How do you open a new "shell" in
> kdevelop? I mean how do you tell kdevelop that you want plugin foo in
> project bar to have environment variable PATH including
> /opt/myfoobar/bin? I'd say by having a environment widget in the plugin
> configuration for foo, which stores its values into the project
> configuration of bar.

Simple.  Modify my environment settings widget to have a combo with an 'add 
env', 'remove env' buttons and a 'current env' drop down list.

Then the user can press 'add env' and she'll be presented with the environment 
settings widget i made with all the default environment variables.  The user 
can then edit it to her hearts content.  She can remove these 'shells' and or 
add as many as she likes.  She can set the current env to such and such.

Then, in the plugin config widget you could have a 'set plugin env' drop down 
list and checkbox that will let the user choose a mandatory shell to use with 
said plugin/run/debug whatever.  If that drop down is disabled (the default) 
the plugin will use the currently set environent as found in the environment 
config widget.

Same with your multiple run/debug actions.  Just let the user associate an 
action with a 'shell'.

If a plugin *must* work with a specific shell then the plugin when loaded can 
add that shell to the list and set it as the default.

Still, the user will have *one* place to manager her environment.

Adam




More information about the KDevelop-devel mailing list