Commit 9f33ee4d authored by Stefano Crocco's avatar Stefano Crocco
Browse files

Add an entry to the wallet popup menu to start filling of web forms

Sometimes the user may need to fill the web forms on a page after the
page has been loaded (for example because the page has unconvetional
ways of asking for login information which prevent automatic filling
from working).

A second entry to show the wallet manager is also added to the menu.
parent 73ecc2e1
......@@ -811,9 +811,14 @@ void WebEnginePart::slotShowWalletMenu()
{
QMenu *menu = new QMenu(nullptr);
bool hasCustomForms = m_wallet && m_wallet->hasCustomizedCacheableForms(url());
if ((m_wallet && m_walletData.hasAutoFillableForms) || hasCustomForms) {
if (m_wallet) {
if (m_walletData.hasCachedData) {
menu->addAction(i18nc("Fill the forms with data from KWallet", "&Fill forms now"), [this]{if(page() && m_wallet){m_wallet->detectAndFillPageForms(page());}});
}
if (m_walletData.hasAutoFillableForms || hasCustomForms) {
menu->addAction(i18n("Memorize passwords in this page &now"), [this]{if (page() && m_wallet){m_wallet->savePageDataNow(page());}});
}
}
if (m_wallet && (m_walletData.hasForms ||hasCustomForms)) {
menu->addSeparator();
if (m_walletData.hasForms) {
......@@ -832,6 +837,7 @@ void WebEnginePart::slotShowWalletMenu()
}
menu->addSeparator();
menu->addAction(i18nc("Launch the wallet manager from the popup menu", "Launch wallet manager"), this, [this]{slotLaunchWalletManager();});
menu->addAction(i18n("&Close Wallet"), this, &WebEnginePart::resetWallet);
KAcceleratorManager::manage(menu);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment