diff options
author | 2022-08-31 14:28:58 +0530 | |
---|---|---|
committer | 2022-08-31 14:28:58 +0530 | |
commit | ff575c452bf68f8ecc739979b2638f2a06d1acce (patch) | |
tree | 575cc7417c75b41ea69665f537254d7875af4ce8 /src/webview.cpp | |
parent | d03e9fc67023375d36cba3daeb11fe1e56b82257 (diff) | |
download | whatsie-ff575c452bf68f8ecc739979b2638f2a06d1acce.tar.gz whatsie-ff575c452bf68f8ecc739979b2638f2a06d1acce.zip |
chore: some enhancements
- webengine multiprocess
- webengine disable sandbox
- minor memory usage improvements
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 38de330..15958db 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -51,13 +51,14 @@ WebView::WebView(QWidget *parent, QStringList dictionaries) void WebView::contextMenuEvent(QContextMenuEvent *event) { QMenu *menu = page()->createStandardContextMenu(); + menu->setAttribute(Qt::WA_DeleteOnClose, true); // hide reload, back, forward, savepage, copyimagelink menus foreach (auto *action, menu->actions()) { - if (action == page()->action(QWebEnginePage::SavePage) - || action == page()->action(QWebEnginePage::Reload) - || action == page()->action(QWebEnginePage::Back) - || action == page()->action(QWebEnginePage::Forward) - || action == page()->action(QWebEnginePage::CopyImageUrlToClipboard)) { + if (action == page()->action(QWebEnginePage::SavePage) || + action == page()->action(QWebEnginePage::Reload) || + action == page()->action(QWebEnginePage::Back) || + action == page()->action(QWebEnginePage::Forward) || + action == page()->action(QWebEnginePage::CopyImageUrlToClipboard)) { action->setVisible(false); } } |