aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/webview.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-13 14:01:01 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-13 14:01:01 +0200
commit29ba3288d0d342e79d14676a02af555c6d43c3e6 (patch)
treeb4201b61782df21cf22fa8efad8619d1e9f2adb5 /src/webengine/webview.cpp
parentUpdate readme (diff)
downloadsmolbote-29ba3288d0d342e79d14676a02af555c6d43c3e6.tar.xz
unstable: KWallet integration
Diffstat (limited to 'src/webengine/webview.cpp')
-rw-r--r--src/webengine/webview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index f8be48e..59ad32a 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -23,6 +23,7 @@
#include <web/profilemanager.h>
#include <web/webprofile.h>
#include "browser.h"
+#include "wallet/wallet.h"
inline QAction *historyAction(QWebEngineView *view, const QWebEngineHistoryItem &item)
{
@@ -120,6 +121,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
QMenu *menu = new QMenu(this);
const auto ctxdata = page()->contextMenuData();
+ // back, forward, reload, mute buttons, added to all variants of the context menu
{
auto *navButtons = new QWidgetAction(this);
@@ -288,6 +290,16 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu->addAction(zoomWidgetAction);
}
+#ifdef QT_DEBUG
+ {
+ menu->addSeparator();
+ auto *autofillAction = menu->addAction(tr("Autofill form"));
+ connect(autofillAction, &QAction::triggered, this, [this]() {
+ Wallet::autocompleteForm(this);
+ });
+ };
+#endif
+
menu->setMinimumWidth(250);
menu->exec(event->globalPos());
}