1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Some more code cleanup

This commit is contained in:
Martin Tůma 2024-01-01 13:02:42 +01:00
parent c97561add4
commit a1e10c395a

View File

@ -273,21 +273,21 @@ bool OziMap::setTileInfo(const QStringList &tiles, const QString &path)
const QString &tile = tiles.at(i);
if (tile.contains(rx)) {
_tile.path = QString(tile).replace(rx, "_%1_%2.");
QString pattern(QString(tile).replace(rx, "_%1_%2."));
if (_tar) {
QByteArray ba(_tar->file(tile));
QBuffer buffer(&ba);
_tile.path = pattern;
_tile.size = QImageReader(&buffer).size();
} else {
_tile.path = path + "/" + _tile.path;
_tile.path = path + "/" + pattern;
_tile.size = QImageReader(path + "/" + tile).size();
}
if (_tile.size.isValid()) {
_map.path = QString();
if (_tile.size.isValid())
return true;
} else
else
qWarning("%s: error reading tile image", qPrintable(tile));
}
}