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

Open MBTiles SQL files in read-only mode

This commit is contained in:
Martin Tůma 2019-01-18 00:29:47 +01:00
parent 735159fc79
commit e88c0c34d0

View File

@ -65,6 +65,7 @@ MBTilesMap::MBTilesMap(const QString &fileName, QObject *parent)
{
_db = QSqlDatabase::addDatabase("QSQLITE", fileName);
_db.setDatabaseName(fileName);
_db.setConnectOptions("QSQLITE_OPEN_READONLY");
if (!_db.open()) {
_errorString = fileName + ": Error opening database file";