Changeset View
Changeset View
Standalone View
Standalone View
src/core/scheduler.cpp
Show First 20 Lines • Show All 976 Lines • ▼ Show 20 Line(s) | 976 | { | |||
---|---|---|---|---|---|
977 | //qDebug() << job; | 977 | //qDebug() << job; | ||
978 | setJobPriority(job, 1); | 978 | setJobPriority(job, 1); | ||
979 | } | 979 | } | ||
980 | #endif | 980 | #endif | ||
981 | 981 | | |||
982 | void SchedulerPrivate::setJobPriority(SimpleJob *job, int priority) | 982 | void SchedulerPrivate::setJobPriority(SimpleJob *job, int priority) | ||
983 | { | 983 | { | ||
984 | //qDebug() << job << priority; | 984 | //qDebug() << job << priority; | ||
985 | const QString protocol = SimpleJobPrivate::get(job)->m_protocol; | ||||
986 | if (!protocol.isEmpty()) { | ||||
985 | ProtoQueue *proto = protoQ(SimpleJobPrivate::get(job)->m_protocol, job->url().host()); | 987 | ProtoQueue *proto = protoQ(SimpleJobPrivate::get(job)->m_protocol, job->url().host()); | ||
986 | proto->changeJobPriority(job, priority); | 988 | proto->changeJobPriority(job, priority); | ||
987 | } | 989 | } | ||
990 | } | ||||
988 | 991 | | |||
989 | void SchedulerPrivate::cancelJob(SimpleJob *job) | 992 | void SchedulerPrivate::cancelJob(SimpleJob *job) | ||
990 | { | 993 | { | ||
991 | // this method is called all over the place in job.cpp, so just do this check here to avoid | 994 | // this method is called all over the place in job.cpp, so just do this check here to avoid | ||
992 | // much boilerplate in job code. | 995 | // much boilerplate in job code. | ||
993 | if (SimpleJobPrivate::get(job)->m_schedSerial == 0) { | 996 | if (SimpleJobPrivate::get(job)->m_schedSerial == 0) { | ||
994 | //qDebug() << "Doing nothing because I don't know job" << job; | 997 | //qDebug() << "Doing nothing because I don't know job" << job; | ||
995 | return; | 998 | return; | ||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |