[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: handling a failed loading of images
From: Thomas Zander <zander () kde ! org>
Date: 2009-08-31 19:03:49
Message-ID: 200908312103.50314.zander () kde ! org
[Download RAW message or body]
On Monday 31. August 2009 13.13.51 Jos van den Oever wrote:
> When loading images, the function KoImageCollection::createImageData is
> called. If imageData does not contain valid image data, the data is not
> loaded and the assert Q_ASSERT(data->key() == key) fails.
Aha, sounds like a unit test that we should have, but don't...
> Adding a check
> if (data->errorCode() != KoImageData::Success) {
> ....
> }
> is needed after data->setImage(imageData). The question I have is, how to
> propagate the error. The function description does not describe how the
> function behaves when loading fails.
I think we should use the KoImageData::isValid() for that. It looks like the
perfect usage.
--
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic