mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 03:54:18 -04:00
Code reformatted using kde-dev-scripts/astyle-kdelibs.
Use git blame -w 47df948
to show authorship as it was before this commit.
This commit is contained in:
@ -77,12 +77,15 @@ bool SoftimagePICHandler::supportsOption(ImageOption option) const
|
||||
|
||||
QImageIOPlugin::Capabilities SoftimagePICPlugin::capabilities(QIODevice *device, const QByteArray &format) const
|
||||
{
|
||||
if (format == "pic")
|
||||
if (format == "pic") {
|
||||
return Capabilities(CanRead | CanWrite);
|
||||
if (!format.isEmpty())
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
if (!device->isOpen())
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
if (device->isReadable() && SoftimagePICHandler::canRead(device)) {
|
||||
@ -94,9 +97,9 @@ QImageIOPlugin::Capabilities SoftimagePICPlugin::capabilities(QIODevice *device,
|
||||
return cap;
|
||||
}
|
||||
|
||||
QImageIOHandler * SoftimagePICPlugin::create(QIODevice *device, const QByteArray &format) const
|
||||
QImageIOHandler *SoftimagePICPlugin::create(QIODevice *device, const QByteArray &format) const
|
||||
{
|
||||
QImageIOHandler * handler = new SoftimagePICHandler();
|
||||
QImageIOHandler *handler = new SoftimagePICHandler();
|
||||
handler->setDevice(device);
|
||||
handler->setFormat(format);
|
||||
return handler;
|
||||
|
Reference in New Issue
Block a user