Rename the stack for this notebook
| 757 | |
| 758 | // Rename the stack for this notebook |
| 759 | void NotebookTable::renameStack(QString oldName, QString newName) { |
| 760 | QList<qint32> lids; |
| 761 | findByStack(lids, oldName); |
| 762 | NSqlQuery query(db); |
| 763 | db->lockForWrite(); |
| 764 | query.prepare("Update Datastore set data=:newname where key=:key and data=:oldname"); |
| 765 | query.bindValue(":newname", newName); |
| 766 | query.bindValue(":key", NOTEBOOK_STACK); |
| 767 | query.bindValue(":oldname", oldName); |
| 768 | query.exec(); |
| 769 | query.finish(); |
| 770 | db->unlock(); |
| 771 | |
| 772 | for (qint32 i=0; i<lids.size(); i++) |
| 773 | setDirty(lids[i], true); |
| 774 | } |
| 775 | |
| 776 | |
| 777 |
no test coverage detected