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

Method UpdateDocument6

src/database/WizDatabase.cpp:253–268  ·  view source on GitHub ↗

* @brief Update document data via html file name and url. * * @param strHtmlFileName File must be unicode format. * @param strURL * @param nFlags * @return true * @return false */

Source from the content-addressed store, hash-verified

251 * @return false
252 */
253bool WizDocument::UpdateDocument6(const QString &strHtmlFileName, const QString &strURL, int nFlags)
254{
255 if (strHtmlFileName.isEmpty())
256 return false;
257
258 if (!m_db.canEditDocument(m_data))
259 return false;
260
261 QString strHtml;
262 if (WizLoadUnicodeTextFromFile(strHtmlFileName, strHtml)) {
263 //TODO: update m_data
264 return m_db.updateDocumentData(m_data, strHtml, strURL, nFlags);
265 } else {
266 return false;
267 }
268}
269
270/**
271 * @brief Delete from server

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
canEditDocumentMethod · 0.80
updateDocumentDataMethod · 0.80

Tested by

no test coverage detected