RFC: ThreadWeaver Job Decorators not used properly and have no effect
AbandonedPublic

Authored by fvogt on Jun 5 2019, 3:09 PM.

Details

Reviewers
None
Summary

ThreadWeaver Job Decorators don't actually hook into an existing job.
Instead, they provide the same interface as the job and just pass through
all calls.

The way the QObjectDecorator is used by KRunner results in no signals actually
getting emitted, making most of the code pointless.

This patch is just a quick hack to show what would happen if the jobDone signal
worked and is mostly intended to present the issue.

Test Plan

jobDone is called now.

Diff Detail

Repository
R308 KRunner
Branch
hack
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12435
Build 12453: arc lint + arc unit
fvogt created this revision.Jun 5 2019, 3:09 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 5 2019, 3:09 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
fvogt requested review of this revision.Jun 5 2019, 3:09 PM
apol added a subscriber: apol.Jul 18 2019, 7:54 PM

I need this additionally

diff --git a/src/runnermanager.cpp b/src/runnermanager.cpp
index f92830d..6ec0c3c 100644
--- a/src/runnermanager.cpp
+++ b/src/runnermanager.cpp
@@ -345,6 +345,7 @@ public:
             emit q->matchesChanged(context.matches());
         }
 
+        teardownRequested = true;
         checkTearDown();
     }
 
@@ -833,6 +834,7 @@ void RunnerManager::reset()
     }
 
     d->context.reset();
+    emit queryFinished();
 }
 
 } // Plasma namespace

With this it works quite reliably for me.

fvogt abandoned this revision.Jan 30 2020, 8:09 AM

D22758 got merged