Introduce KUiServerV2JobTracker
This uses the new JobTracker DBus interface introduced back in Plasma 5.16. It is based on a variant map of properties rather than individual method calls.
Advantages of this new implementation:
- Fully asynchronous. Registration of a view is done asynchronously.
- Updates are batched, this way changes that typically happen in lockstep, such as number of files copied and file name, or the description fields are sent out together in a single call
- Job state is cached throughout the lifetime of a job. This is needed for asynchronous operation but more importantly lets the job tracker fully restore its state on the server side should the server restart during the job's lifetime
- Treats "title" and "infoMessage" separately. Title is something like "Copying" wheras "infoMessage" shows transient information like "Connecting to server...".
- Supports requesting immediate job reporting (though a dynamic property on the Job object which is a little ugly) useful for jobs such as receiving files from KDE Connect or downloading a file in the browser where one would usually want a confirmation that it's happening and access to the "Open" action on the notification once it's done.
- Delay handling (to avoid showing shortlived jobs) is done on client side so that there's less pointless DBus traffic.
@dfaure @nicolasfella @davidedmundson
Will look into supporting both v1 and v2 in KDynamicJobTracker
next (see kio!314 (merged) )
- Starting a job and immediately stopping it registeres a view and terminates it again properly, no stale job view is left in plasma
- infoMessage shows up correctly now (this is mostly what prompted all of this :D I didn't see a way how to fix that backwards-compatible and future-proof in the existing DBus API)
- Verified that restarting plasmashell while a job is running fully restores its state to how it was before
Edited by Kai Uwe Broulik