KIO: Mass Copy of Files from Different Sources to Different Destinations
aikawarazuni at gmail.com
Thu Jun 18 08:55:48 BST 2009
Using KIO::copy( ... ) to generate more than 150 jobs causes the KIO
scheduler to complain:
"WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse
in your app (yes, a job is a QObject)."
What misuse is this, isn't the KIO::Scheduler supposed to schedule
jobs? I notice that you can directly tell the scheduler to schedule a
job with KIO::Scheduler::scheduleJob(...) which will queue jobs when
no slaves are left over and possibly avoid this error, but that only
works for SimpleJobs, and a CopyJob is not a SimpleJob.
Up until now I've worked around it by manually keeping track of jobs I
create and jobs that finish so as not to make the Scheduler angry, but
shouldn't this be part of the Scheduler's job?
I notice most applications don't run into this issue because they use
KIO to copy a folder that could contain more than 150 files which is
fine, or copy more than 150 files to a single destination, but in my
case each file I copy can come from a different source and go to a
different destination so I can not aggregate the jobs.
More information about the kde-core-devel