Changeset View
Changeset View
Standalone View
Standalone View
lib/document/loadingdocumentimpl.cpp
Show First 20 Lines • Show All 443 Lines • ▼ Show 20 Line(s) | |||||
444 | 444 | | |||
445 | void LoadingDocumentImpl::slotTransferFinished(KJob* job) | 445 | void LoadingDocumentImpl::slotTransferFinished(KJob* job) | ||
446 | { | 446 | { | ||
447 | if (job->error()) { | 447 | if (job->error()) { | ||
448 | setDocumentErrorString(job->errorString()); | 448 | setDocumentErrorString(job->errorString()); | ||
449 | emit loadingFailed(); | 449 | emit loadingFailed(); | ||
450 | switchToImpl(new EmptyDocumentImpl(document())); | 450 | switchToImpl(new EmptyDocumentImpl(document())); | ||
451 | return; | 451 | return; | ||
452 | } else if (document()->kind() == MimeTypeUtils::KIND_UNKNOWN) { | ||||
453 | // Transfer finished. If the mime type is still unknown (e.g. for files < HEADER_SIZE) | ||||
454 | // determine the kind again. | ||||
455 | if (d->determineKind()) { | ||||
456 | return; | ||||
457 | } | ||||
452 | } | 458 | } | ||
453 | d->startLoading(); | 459 | d->startLoading(); | ||
454 | } | 460 | } | ||
455 | 461 | | |||
456 | bool LoadingDocumentImpl::isEditable() const | 462 | bool LoadingDocumentImpl::isEditable() const | ||
457 | { | 463 | { | ||
458 | return d->mDownSampledImageLoaded; | 464 | return d->mDownSampledImageLoaded; | ||
459 | } | 465 | } | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |