Rework of the outputview interface

Matt Rogers mattr at kde.org
Sat Jun 9 13:47:19 UTC 2007


On Friday 08 June 2007 11:43, Andreas Pakulat wrote:
> Hi,
>
> as Matt suggested some time ago, I reworked the outputview to more
> closely follow the MVC pattern.
>
> The outputview now has a much simpler interface, registering a new view
> with title, setting a model for that view and emitting a signal whenever
> an index in the view is activated.
>
> Also this adds a really simple OutputModel for convience, it just
> provides 2 slots to connect to ProcessLineMaker or the new
> ExecuteCommand class on top of a QStandardItemModel. This is not meant
> to get extended, unless we find that various outputview-users do the
> same thing in their custom models. Really just convenience (thats also
> why it lacks api docs, I will add these before commit of course)
>
> Last but not least there's the new ExecuteCommand class, it provides
> simplified signals on top of QProcess to make it easier to execute
> commands for the outputview. I've put it into util because it can be
> used for other things as well (if you only need the output and
> failed/completed signal). For more complex needs QProcess (or the
> proposed KProcess from Oswald) can be used.
>
> 2 things that are missing:
>
> a) context menu access for the outputviews
> b) removing a view (and letting the user clean up their data)
>
> I will do both tomorrow, adding a viewClosed() signal to IOutputView and
> checking where we need to implement customContextMenu().
>
> Please review and post your comments. The first patch is for the
> platform, including porting svn plugin. The second patch is for KDevelop
> itself, I only ported the qmake builder as the make builder is
> relatively complex already and I don't have time today for that. (first
> patch is too large so I needed to compress it)
>
> Andreas

Comments:

Instead of ExecuteCommand for the class name, use CommandExecutor instead.

Looks fine otherwise.
-- 
Matt




More information about the KDevelop-devel mailing list