Close a specific notebook
| 1128 | |
| 1129 | // Close a specific notebook |
| 1130 | void NotebookTable::closeNotebook(qint32 lid) { |
| 1131 | NSqlQuery query(db); |
| 1132 | db->lockForWrite(); |
| 1133 | query.prepare("delete from DataStore where lid=:lid and key=:key"); |
| 1134 | query.bindValue(":lid", lid); |
| 1135 | query.bindValue(":key", NOTEBOOK_IS_CLOSED); |
| 1136 | query.exec(); |
| 1137 | |
| 1138 | query.prepare("insert into DataStore (lid, key, data) values (:lid, :key, 1)"); |
| 1139 | query.bindValue(":lid", lid); |
| 1140 | query.bindValue(":key", NOTEBOOK_IS_CLOSED); |
| 1141 | query.exec(); |
| 1142 | query.finish(); |
| 1143 | db->unlock(); |
| 1144 | } |
| 1145 | |
| 1146 | |
| 1147 |
no test coverage detected