| Summary: | Copy paste error in KIO::TransferJob::doResume() | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | wolthera <griffinvalley> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | a.samirh78, kdelibs-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
I might be wrong btw, I am not too familiar with the code, just confused that resume suspends a thing but never resumes... There are two different objects here, a KIO job and KIO slave; the actual job resume is done in SimpleJob::doResume() and if that succeeds, d->internalSuspend() suspends the KIO slave (not the job):
void TransferJobPrivate::internalSuspend()
{
m_internalSuspended = true;
if (m_slave) {
m_slave->suspend();
}
}
Alright, thanks! |
Hey, I was looking at the KIO job files because I was trying to understand how KJob::doResume() should be implemented, and noticed the following in the transferjob file: 291 bool TransferJob::doResume() 292 { 293 Q_D(TransferJob); 294 if (!SimpleJob::doResume()) { 295 return false; 296 } 297 if (d->m_internalSuspended) { 298 d->internalSuspend(); 299 } 300 return true; 301 } The function seems to call d->internalSuspend() on line 298 instead of d->internalResume(), which seems wrong to me? I am looking at the file here: https://api.kde.org/frameworks-api/frameworks-apidocs/frameworks/kio/html/transferjob_8cpp_source.html