[VCS] removing showXXX

Andreas Pakulat apaku at gmx.de
Tue Nov 13 21:36:54 UTC 2007


On 13.11.07 14:28:07, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > I was about to implement showDiff() for Subversion and already found it
> > cool to replace the current slot for the diff-context menu with just a
> > call to showDiff. But then I found some "questions":
> > 
> > a) how to show the widget
> > b) how's the lifespan of the job and the widget object
> > c) how to let the widget know about the job
> > 
> > Especially c) leads one directly to something like:
> > 
> > DiffWidget( VcsJob* job, QWidget* parent );
> > 
> > And when you're there, you don't actually need showDiff anymore, because
> > it doesn't provide anything you can't do with the
> > kdevplatform-diffwidget and the normal diff() call. (I know the
> > diffwidget doesn't exist yet).
> > 
> > Same problems arise for the other showXXX methods, namely log, annotate,
> > change, ls and cat. For all of those we will have a widget that can
> > display the result of the according VcsJob and thus the "extra work" to
> > display the result instead of doing something with it is practically
> > non-existent.
> > 
> > Also it removes some confusion from the API.
> > 
> > So are there any objections against removing the showXXX methods, do I
> > overlook anything?
> 
> Remind me again what happened to commit() vs. showCommit()?

Doesn't exist (and IIRC never existed). We said at some point that
showXXX would mean show the result in a GUI. IIRC we said the interface
API should automatically ask for stuff thats missing via a GUI.

> Otherwise, as long as the platform is able to handle appropriate 
> wrapping of what the VCS provides, this sounds good. (What about 
> overloads; is the plugin able to implement its own DiffWidget if it 
> needs to extend it for some reason? I guess this isn't likely with diff 
> widget, but maybe for change/log/annotate...)

A VCS plugin can surely implement its own logging, annotation or
whatever output, but that wouldn't be available to users of the API,
only available via QAction elements that the plugin provides itself (via
context menu, toolbar/menu)

Andreas

-- 
It was all so different before everything changed.




More information about the KDevelop-devel mailing list