@meme: This is complicated. From what I see, in all DeviceJobs a call to the 'done' function is scheduled (signal emitted on a queued connection), then the job terminates. This allows the next job to start, without necessarily having run the done function. Because of this, your plugin gets called before the database is updated. The done function is queued behind you, assuming that you are running on the GUI thread.
@kovid: I think that FunctionDispatcher should be used instead of Dispatcher. That way the done function will be finished before the job terminates.
|