Using the KomparePart in KDevelop
Killerfox
killerfox512 at gmail.com
Fri Jul 17 17:07:59 UTC 2009
On Friday 17 July 2009 01:21:45 am Andreas Pakulat wrote:
> On 16.07.09 17:09:00, Killerfox wrote:
> > Hello List, I am the GSoC student working on refactoring support for
> > KDevelop. Right now I am working on a dialog to show the users the
> > changes made by a plugin, and then allowing them to change something if
> > they don't find it accurate.
> >
> > I want to embed a KomparePart into the dialog. However it has been quite
> > hard to find documentation about how to use a KomparePart. From what I
> > have gathered it is preferred to create a KPart through KMimeTypeTrader,
> > however I won't be working with diff files, but with two versions of the
> > file, and I was hoping that Kompare could do the diff, and display the
> > changes.
> >
> > So could anyone here point me in the right direction on how to go about
> > this?
>
> Well, the kompare interface is in
> kdesdk/kompare/interfaces/kompareinterface.h. And there's a compare(
> url1, url2 ) function there that seems suitable :)
>
> So all you need to do is create a KParts::Part* instance and
> dynamic_cast it to the KompareInterface class. Creating the part can be
> done in KDevelop via PartController::createPart(), but we'll have to
> expose that somehow in the interfaces library as its currently in shell/
> only.
>
> Andreas
So we are currently deciding in KDevelop to use KomparePart as an option. Have
there been plans to write a FindKompare.cmake? or even FindKdesdk.cmake?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kompare-devel/attachments/20090717/a3f11f07/attachment.htm
More information about the Kompare-devel
mailing list