MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / deleteToTrash

Method deleteToTrash

src/database/WizDatabase.cpp:274–291  ·  view source on GitHub ↗

* @brief Delete from server * */

Source from the content-addressed store, hash-verified

272 *
273 */
274void WizDocument::deleteToTrash()
275{
276 // move document to trash
277
278// int nVersion = m_data.nVersion;
279 moveTo(m_db.GetDeletedItemsFolder());
280 m_db.setDocumentVersion(m_data.strGUID, 0);
281
282 // delete document from server
283 CWizDocumentAttachmentDataArray arrayAttachment;
284 m_db.getDocumentAttachments(m_data.strGUID, arrayAttachment);
285 CWizDocumentAttachmentDataArray::const_iterator it;
286 for (it = arrayAttachment.begin(); it != arrayAttachment.end(); it++) {
287 m_db.logDeletedGuid(it->strGUID, wizobjectDocumentAttachment);
288 }
289
290 m_db.logDeletedGuid(m_data.strGUID, wizobjectDocument);
291}
292
293/**
294 * @brief Delete local file

Callers 2

DeleteMethod · 0.80
deleteGroupFolderMethod · 0.80

Calls 6

GetDeletedItemsFolderMethod · 0.80
setDocumentVersionMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
logDeletedGuidMethod · 0.80

Tested by

no test coverage detected