mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Improve read only project file loading
This slightly changes the behaviour regarding the read-only mode in project files. It makes sure that we always respect the user's choice to open a file in read-only mode, even if the project file says it wasn't opened in read-only mode before.
This commit is contained in:
@@ -2616,8 +2616,8 @@ bool MainWindow::loadProject(QString filename, bool readOnly)
|
||||
if(xml.name() == "db")
|
||||
{
|
||||
// Read only?
|
||||
if(xml.attributes().hasAttribute("readonly"))
|
||||
readOnly = xml.attributes().value("readonly").toInt();
|
||||
if(xml.attributes().hasAttribute("readonly") && xml.attributes().value("readonly").toInt())
|
||||
readOnly = true;
|
||||
|
||||
// DB file
|
||||
QString dbfilename = xml.attributes().value("path").toString();
|
||||
|
||||
Reference in New Issue
Block a user