From e88c0c34d0d4d1d5465af320129400c1ccad1adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 18 Jan 2019 00:29:47 +0100 Subject: [PATCH] Open MBTiles SQL files in read-only mode --- src/map/mbtilesmap.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/map/mbtilesmap.cpp b/src/map/mbtilesmap.cpp index b00fd17d..57edc649 100644 --- a/src/map/mbtilesmap.cpp +++ b/src/map/mbtilesmap.cpp @@ -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";