mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
Properly report thr format
This commit is contained in:
parent
f4b1952b95
commit
308bb59fc4
@ -31,7 +31,11 @@ static bool isPlainPBF(quint32 magic)
|
||||
|
||||
bool PBFHandler::canRead() const
|
||||
{
|
||||
return canRead(device());
|
||||
if (canRead(device())) {
|
||||
setFormat("pbf");
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PBFHandler::canRead(QIODevice *device)
|
||||
@ -88,8 +92,3 @@ QVariant PBFHandler::option(ImageOption option) const
|
||||
{
|
||||
return (option == Size) ? QSize(TILE_SIZE, TILE_SIZE) : QVariant();
|
||||
}
|
||||
|
||||
QByteArray PBFHandler::name() const
|
||||
{
|
||||
return "pbf";
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ public:
|
||||
bool canRead() const;
|
||||
bool read(QImage *image);
|
||||
|
||||
QByteArray name() const;
|
||||
QVariant option(ImageOption option) const;
|
||||
bool supportsOption(ImageOption option) const;
|
||||
void setOption(QImageIOHandler::ImageOption option, const QVariant &value);
|
||||
|
Loading…
Reference in New Issue
Block a user