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

Method PermanentlyDelete

src/database/WizDatabase.cpp:391–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void WizDocument::PermanentlyDelete()
392{
393 CWizDocumentAttachmentDataArray arrayAttachment;
394 m_db.getDocumentAttachments(m_data.strGUID, arrayAttachment);
395
396 CWizDocumentAttachmentDataArray::const_iterator it;
397 for (it = arrayAttachment.begin(); it != arrayAttachment.end(); it++) {
398 CString strFileName = m_db.getAttachmentFileName(it->strGUID);
399 ::WizDeleteFile(strFileName);
400
401 m_db.deleteAttachment(*it, true, true);
402 }
403
404 if (!m_db.deleteDocument(m_data, true)) {
405 TOLOG1("Failed to delete document: %1", m_data.strTitle);
406 return;
407 }
408
409 CString strZipFileName = m_db.getDocumentFileName(m_data.strGUID);
410 if (WizPathFileExists(strZipFileName))
411 {
412 WizDeleteFile(strZipFileName);
413 }
414}
415
416void WizDocument::moveTo(QObject* p)
417{

Callers

nothing calls this directly

Calls 9

WizDeleteFileFunction · 0.85
WizPathFileExistsFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
getAttachmentFileNameMethod · 0.80
getDocumentFileNameMethod · 0.80
deleteAttachmentMethod · 0.45
deleteDocumentMethod · 0.45

Tested by

no test coverage detected