Properly report thr format

This commit is contained in:
Martin Tůma 2018-11-13 22:49:39 +01:00
parent f4b1952b95
commit 308bb59fc4
2 changed files with 5 additions and 7 deletions

View File

@ -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";
}

View File

@ -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);