DVcsJob result

Maciej Poleski d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com
Sat Nov 9 18:41:21 UTC 2013


Hi,

I'm going to implement KDevelop::IBasicVersionControl::annotate. I looked at 
Git integration and I found something like this:

DVcsJob* job = new GitJob(...);
// working with job...
connect(job, SIGNAL(readyForParsing(KDevelop::DVcsJob*)), this, 
SLOT(parseGitBlameOutput(KDevelop::DVcsJob*)));
return job;

This code returns job without result, but connected to slot which will set one 
later.

Implementation of this slot "simply" set the result:

QVariantList results;
// working with results
job->setResults(results);

Implementation of DVcsJob::setResults is extremly straight forward:

void DVcsJob::setResults(const QVariant &res)
{
 d->results = res;
}

The question is how receiver of this job gets notified about result ready to 
use? (Or how to use DVcsJob if I have to wait for Job completion to build 
result based on output of this job?)

Best Regards
Maciej Poleski


More information about the KDevelop-devel mailing list