[VCS] removing showXXX

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Nov 13 20:28:07 UTC 2007


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()?

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

-- 
Matthew
Me: wtf?? "#warning This is temporary since Dec 2000". Seven-year 
"temporary" code?
Mathieu Chouinard: Sounds like the correct definition of temporary :)





More information about the KDevelop-devel mailing list