void MainMenu::aboutToShowEditMenu() { if (!m_window) { return; } WebView* view = m_window->weView(); m_actions[QSL("Edit/Undo")]->setEnabled(view->pageAction(QWebPage::Undo)->isEnabled()); m_actions[QSL("Edit/Redo")]->setEnabled(view->pageAction(QWebPage::Redo)->isEnabled()); m_actions[QSL("Edit/Cut")]->setEnabled(view->pageAction(QWebPage::Cut)->isEnabled()); m_actions[QSL("Edit/Copy")]->setEnabled(view->pageAction(QWebPage::Copy)->isEnabled()); m_actions[QSL("Edit/Paste")]->setEnabled(view->pageAction(QWebPage::Paste)->isEnabled()); m_actions[QSL("Edit/SelectAll")]->setEnabled(view->pageAction(QWebPage::SelectAll)->isEnabled()); m_actions[QSL("Edit/Find")]->setEnabled(true); }
void MainMenu::aboutToShowSuperMenu() { if (!m_window) { return; } WebView* view = m_window->weView(); m_actions[QSL("Edit/Find")]->setEnabled(true); m_actions[QSL("Edit/SelectAll")]->setEnabled(view->pageAction(QWebEnginePage::SelectAll)->isEnabled()); }