Bug 381835

Summary: RunnerManager::queryFinished never emitted
Product: [Frameworks and Libraries] frameworks-krunner Reporter: David Edmundson <kde>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.62

Description David Edmundson 2017-06-30 17:27:06 UTC
QObject::connect(job->decorator().data(), SIGNAL(done(ThreadWeaver::JobPointer)), q, SLOT(jobDone(ThreadWeaver::JobPointer)));
            Queue::instance()->enqueue(job);

is broken.

In order to get signals from the decorator you have to actually run the decorator, not the decoratee (which is a bit odd and clearly not a decorator pattern at all)

Changing that is harder than it would seem because Runner dynamic_casts the jobs to FindMatchJob all over the place as it manually bookeeps the jobs despite bookmarking jobs being *literally the entire point of threadweaver*.