- AbstractClipJob *job = m_jobList.takeFirst();
- // Get jobs count
- int ct = 0;
- QList <QFuture<void> > futures = m_proxyThreads.futures();
- for (int i = 0; i < futures.count(); i++)
- if (futures.at(i).isRunning()) {
- ct++;
- }
- emit jobCount(ct + m_jobList.count());
-
- if (job->jobType == PROXYJOB) {
- //ProxyJob *pjob = static_cast<ProxyJob *> (job);
- kDebug()<<"// STARTING JOB: "<<job->destination();
- if (m_abortProxy.contains(job->destination())) {
- m_abortProxy.removeAll(job->destination());
- m_processingProxy.removeAll(job->destination());
- emit cancelRunningJob(job->clipId(), job->cancelProperties());
- delete job;
- continue;
+ AbstractClipJob *job = NULL;
+ int count = 0;
+ for (int i = 0; i < m_jobList.count(); i++) {
+ if (job == NULL && m_jobList.at(i)->jobStatus == JOBWAITING) {
+ m_jobList.at(i)->jobStatus = JOBWORKING;
+ job = m_jobList.at(i);
+ count++;