| 389 | } |
| 390 | |
| 391 | void 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 | |
| 416 | void WizDocument::moveTo(QObject* p) |
| 417 | { |
nothing calls this directly
no test coverage detected