fix: supportedImageFormats() should show sai as supported
This commit is contained in:
parent
a3392513e3
commit
914c270e87
|
@ -41,6 +41,10 @@ bool SAIHandler::canRead(QIODevice *device)
|
|||
|
||||
QImageIOPlugin::Capabilities SAIPlugin::capabilities(QIODevice *device, const QByteArray &format) const
|
||||
{
|
||||
if (format == "sai") {
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
|
||||
if (!format.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
@ -49,7 +53,11 @@ QImageIOPlugin::Capabilities SAIPlugin::capabilities(QIODevice *device, const QB
|
|||
return {};
|
||||
}
|
||||
|
||||
return Capabilities(CanRead);
|
||||
Capabilities cap;
|
||||
if (device->isReadable() && SAIHandler::canRead(device)) {
|
||||
cap |= CanRead;
|
||||
}
|
||||
return cap;
|
||||
}
|
||||
|
||||
QImageIOHandler *SAIPlugin::create(QIODevice *device, const QByteArray &format) const
|
||||
|
|
Loading…
Reference in New Issue
Block a user