KIO: Mass Copy of Files from Different Sources to Different Destinations

Alejandro Wainzinger aikawarazuni at
Wed Aug 19 16:26:33 BST 2009

Awesome!  Yes, I will give it a try.  Another reason that developers
should not have to manage things like CopyJobs is that KIO should
always know better how many simultaneous files should be being copied
at once to make best use of Slaves and bandwidth to the hard drive
where things are being copied to.

On Wed, Aug 19, 2009 at 5:12 PM, David Faure<faure at> wrote:
> On Thursday 18 June 2009, Alejandro Wainzinger wrote:
>> 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.
> This could be another reason for "all jobs should be scheduled",
> as we were discussing in another thread ("Patch KIO::AccessManager").
> I just gave it a try, as an experiment. Shows that scheduleJob has to support
> being called twice for a job, but apart from that, the unittest "jobtest"
> still passes, which is good enough for me :-)
> Can you give the attached patch a try?
> --
> David Faure, faure at, sponsored by Qt Software @ Nokia to work on KDE,
> Konqueror (, and KOffice (

More information about the kde-core-devel mailing list