From c9d651c7b2cc0cba548ef71b3feef8bfd34322e6 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Thu, 9 Aug 2018 14:03:11 +0200 Subject: [PATCH] Add value of the case_sensitive_like PRAGMA to the project files We allow the user to edit the case_senstive_like PRAGMA via the UI. But because its state is not saved in the database - just like with the foreign_key PRAGMA - we should save it in the project file for users who want to restore the entire environment. --- src/MainWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 34ea76e0..a0b68df0 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -2362,6 +2362,8 @@ bool MainWindow::loadProject(QString filename, bool readOnly) // PRAGMAs if(xml.attributes().hasAttribute("foreign_keys")) db.setPragma("foreign_keys", xml.attributes().value("foreign_keys").toString()); + if(xml.attributes().hasAttribute("case_sensitive_like")) + db.setPragma("case_sensitive_like", xml.attributes().value("case_sensitive_like").toString()); } else if(xml.name() == "window") { // Window settings while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "window") @@ -2580,6 +2582,7 @@ void MainWindow::saveProject() xml.writeStartElement("db"); xml.writeAttribute("path", db.currentFile()); xml.writeAttribute("foreign_keys", db.getPragma("foreign_keys")); + xml.writeAttribute("case_sensitive_like", db.getPragma("case_sensitive_like")); xml.writeEndElement(); // Window settings