mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: claim write support only if the format matches and the device is writable
for read capabilities either the format must match or the format header but for writing the format must be exact match Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
45db837f12
commit
aaea32c10c
3 changed files with 3 additions and 3 deletions
|
@ -418,7 +418,7 @@ QImageIOPlugin::Capabilities ICOPlugin::capabilities(QIODevice *device, const QB
|
|||
if (device->isReadable() && ICOHandler::canRead(device)) {
|
||||
cap |= QImageIOPlugin::CanRead;
|
||||
}
|
||||
if (device->isWritable()) {
|
||||
if (format == s_icopluginformat && device->isWritable()) {
|
||||
cap |= QImageIOPlugin::CanWrite;
|
||||
}
|
||||
return cap;
|
||||
|
|
|
@ -258,7 +258,7 @@ QImageIOPlugin::Capabilities JPGPlugin::capabilities(QIODevice *device, const QB
|
|||
if (device->isReadable() && JPGHandler::canRead(device)) {
|
||||
cap |= QImageIOPlugin::CanRead;
|
||||
}
|
||||
if (device->isWritable()) {
|
||||
if (format == s_jpgpluginformat && device->isWritable()) {
|
||||
cap |= QImageIOPlugin::CanWrite;
|
||||
}
|
||||
return cap;
|
||||
|
|
|
@ -309,7 +309,7 @@ QImageIOPlugin::Capabilities WebPPlugin::capabilities(QIODevice *device, const Q
|
|||
if (device->isReadable() && WebPHandler::canRead(device)) {
|
||||
cap |= QImageIOPlugin::CanRead;
|
||||
}
|
||||
if (device->isWritable()) {
|
||||
if (format == s_webppluginformat && device->isWritable()) {
|
||||
cap |= QImageIOPlugin::CanWrite;
|
||||
}
|
||||
return cap;
|
||||
|
|
Loading…
Add table
Reference in a new issue