1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

Added workaround for broken Qt SVG image plugin colliding with the MVT plugin

This commit is contained in:
Martin Tůma 2023-12-09 18:00:24 +01:00
parent 029f36a5da
commit bac55e317b

View File

@ -135,7 +135,9 @@ bool MBTilesMap::getTileSize()
QByteArray data = query.value(0).toByteArray();
QBuffer buffer(&data);
QImageReader reader(&buffer);
/* Explicitly specify the image plugin in case of vector tiles
(QTBUG-119910 workaround) */
QImageReader reader(&buffer, _scalable ? QByteArray("mvt") : QByteArray());
QSize tileSize(reader.size());
if (!tileSize.isValid() || tileSize.width() != tileSize.height()) {
@ -215,9 +217,9 @@ MBTilesMap::MBTilesMap(const QString &fileName, QObject *parent)
return;
if (!getBounds())
return;
getTileFormat();
if (!getTileSize())
return;
getTileFormat();
getTilePixelRatio();
getName();