Fix: WebP missing from QMovie::supportedFormats()

Use QImageReader::supportsOption() instead of ::supportsAnimation(),
since the former checks what the handler supports in general, not just
the particular device.

Task-number: QTBUG-61642
Change-Id: I57db24425b4fd8821446659936e6a8ca55008921
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
bb10
Eirik Aavitsland 2017-08-02 13:44:12 +02:00
parent 3b962d16db
commit 01af6771c3
1 changed files with 1 additions and 1 deletions

View File

@ -975,7 +975,7 @@ QList<QByteArray> QMovie::supportedFormats()
const auto doesntSupportAnimation =
[&buffer](const QByteArray &format) {
return !QImageReader(&buffer, format).supportsAnimation();
return !QImageReader(&buffer, format).supportsOption(QImageIOHandler::Animation);
};
list.erase(std::remove_if(list.begin(), list.end(), doesntSupportAnimation), list.end());