<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">On Friday 17 July 2009 01:21:45 am Andreas Pakulat wrote:<br>
&gt; On 16.07.09 17:09:00, Killerfox wrote:<br>
&gt; &gt; Hello List, I am the GSoC student working on refactoring support for<br>
&gt; &gt; KDevelop. Right now I am working on a dialog to show the users the<br>
&gt; &gt; changes made by a plugin, and then allowing them to change something if<br>
&gt; &gt; they don't find it accurate.<br>
&gt; &gt;<br>
&gt; &gt; I want to embed a KomparePart into the dialog. However it has been quite<br>
&gt; &gt; hard to find documentation about how to use a KomparePart. From what I<br>
&gt; &gt; have gathered it is preferred to create a KPart through KMimeTypeTrader,<br>
&gt; &gt; however I won't be working with diff files, but with two versions of the<br>
&gt; &gt; file, and I was hoping that Kompare could do the diff, and display the<br>
&gt; &gt; changes.<br>
&gt; &gt;<br>
&gt; &gt; So could anyone here point me in the right direction on how to go about<br>
&gt; &gt; this?<br>
&gt;<br>
&gt; Well, the kompare interface is in<br>
&gt; kdesdk/kompare/interfaces/kompareinterface.h. And there's a compare(<br>
&gt; url1, url2 ) function there that seems suitable :)<br>
&gt;<br>
&gt; So all you need to do is create a KParts::Part* instance and<br>
&gt; dynamic_cast it to the KompareInterface class. Creating the part can be<br>
&gt; done in KDevelop via PartController::createPart(), but we'll have to<br>
&gt; expose that somehow in the interfaces library as its currently in shell/<br>
&gt; only.<br>
&gt;<br>
&gt; Andreas<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>