Problems managing KIO::Jobs

A. Bikadorov alex.bikadorov at kdemail.net
Mon Nov 14 14:23:01 UTC 2016


Hi,

since there is no frameworks-users list and kde-devel seems less appropriate I'm asking here.

I'm currently working on adding a job manager (similar to Plasma's notification widget)
for KIO jobs to Krusader. While doing that I came across two issues which couldn't be
solved yet.

1. Creating and immediately suspending a job does not work as expected. E.g. after

> KIO::Job job = KIO::copy(urls, dest, flags);
> bool result = job->suspend(); // returns true
> bool result2 = job->isSuspended(); // returns true

the file copy operation is still starting. All progress signals (description(), percent(),
...), are omitted until result() and finished() are emitted. I'm sure this is a bug and
can report it but would also like to know a workaround to continue implementing a "job
queue" (i.e. the user decides when a job is started).

2. Similar to (1) DropJobs are never emitting any signals until finished(). It must be
possible somehow to monitor the progress of copy or move operations because the
notification widget does this. But I could not figure out how plasma-workspace/kuiserver
does this.

Thanks for help!
Alex


More information about the Kde-frameworks-devel mailing list