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

Method trySaveCurrentNote

src/WizMainWindow.cpp:471–479  ·  view source on GitHub ↗

* @brief 检查笔记是否载入,尝试保存当前文档 * @param callback 保存后的回调函数 */

Source from the content-addressed store, hash-verified

469 * @param callback 保存后的回调函数
470 */
471void WizMainWindow::trySaveCurrentNote(std::function<void(const QVariant &)> callback)
472{
473 WizDocumentView* curDocView = qobject_cast<WizDocumentView*>(m_mainTabBrowser->currentWidget());
474 if (curDocView && curDocView->noteLoaded()) {
475 curDocView->web()->trySaveDocument(curDocView->note(), false, callback);
476 } else {
477 callback(QVariant(true));
478 }
479}
480
481void WizMainWindow::closeEvent(QCloseEvent* event)
482{

Calls 3

noteLoadedMethod · 0.80
trySaveDocumentMethod · 0.45
webMethod · 0.45

Tested by

no test coverage detected