| 421 | } |
| 422 | |
| 423 | void LoadingDocumentImpl::loadImage(int invertedZoom) |
| 424 | { |
| 425 | if (d->mImageDataInvertedZoom == invertedZoom) { |
| 426 | LOG("Already loading an image at invertedZoom=" << invertedZoom); |
| 427 | return; |
| 428 | } |
| 429 | if (d->mImageDataInvertedZoom == 1) { |
| 430 | LOG("Ignoring request: we are loading a full image"); |
| 431 | return; |
| 432 | } |
| 433 | d->mImageDataFutureWatcher.waitForFinished(); |
| 434 | d->mImageDataInvertedZoom = invertedZoom; |
| 435 | |
| 436 | if (d->mMetaInfoLoaded) { |
| 437 | // Do not test on mMetaInfoFuture.isRunning() here: it might not have |
| 438 | // started if we are downloading the image from a remote url |
| 439 | d->startImageDataLoading(); |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | void LoadingDocumentImpl::slotDataReceived(KIO::Job *job, const QByteArray &chunk) |
| 444 | { |
no outgoing calls
no test coverage detected