<div dir="ltr">On Sat, Nov 9, 2013 at 7:41 PM, Maciej Poleski <span dir="ltr"><<a href="mailto:d82ks8djf82msd83hf8sc02lqb5gh5@gmail.com" target="_blank">d82ks8djf82msd83hf8sc02lqb5gh5@gmail.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I'm going to implement KDevelop::IBasicVersionControl::annotate. I looked at<br>
Git integration and I found something like this:<br>
<br>
DVcsJob* job = new GitJob(...);<br>
// working with job...<br>
connect(job, SIGNAL(readyForParsing(KDevelop::DVcsJob*)), this,<br>
SLOT(parseGitBlameOutput(KDevelop::DVcsJob*)));<br>
return job;<br>
<br>
This code returns job without result, but connected to slot which will set one<br>
later.<br>
<br>
Implementation of this slot "simply" set the result:<br>
<br>
QVariantList results;<br>
// working with results<br>
job->setResults(results);<br>
<br>
Implementation of DVcsJob::setResults is extremly straight forward:<br>
<br>
void DVcsJob::setResults(const QVariant &res)<br>
{<br>
d->results = res;<br>
}<br>
<br>
The question is how receiver of this job gets notified about result ready to<br>
use? (Or how to use DVcsJob if I have to wait for Job completion to build<br>
result based on output of this job?)<br>
<br>
Best Regards<br>
<span class=""><font color="#888888">Maciej Poleski<br>
_______________________________________________<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kde.org">KDevelop-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdevelop-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kdevelop-devel</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Like with any KJob [1], you'll have to listen to the finished() signal.</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1] <a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKJob.html">http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKJob.html</a></div>
</div>