DVcsJob result
Aleix Pol
aleixpol at kde.org
Mon Nov 11 00:15:19 UTC 2013
On Sat, Nov 9, 2013 at 7:41 PM, Maciej Poleski <
d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com> wrote:
> 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
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kdevelop-devel
>
Like with any KJob [1], you'll have to listen to the finished() signal.
[1] http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKJob.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20131111/309e7d69/attachment-0001.html>
More information about the KDevelop-devel
mailing list