diff options
author | Anees Ahmed <aneesahmedpro@github.com> | 2020-06-22 13:50:45 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2020-07-22 01:22:47 +0300 |
commit | 1d0523ec21b1e46c8ccf53250a3227568d79f082 (patch) | |
tree | 19f0717f811905d826cc14143b991f99f75d8270 /src/gui/DatabaseWidget.cpp | |
parent | f73855a7f2168957a1a917ea4154445d8e1aa583 (diff) |
Add option to Auto-Type just the username/password
Fixes #4444
Some websites these days do not present both the "username" and the "password"
input box on the same webpage (e.g. Google, Amazon). So no custom sequence is
possible to enter both the said attributes in one go.
So, two new context menu actions have been added:
1. Perform Auto-Type of just the username
2. Perform Auto-Type of just the password
These context menu actions are analogous to "Copy username" and "Copy
password", except it avoids sending all characters via clipboard.
* Create a sub-menu in the Context Menu of Entry.
* The sub-menu offers the following sequences:
- {USERNAME}
- {USERNAME}{ENTER}
- {PASSWORD}
- {PASSWORD}{ENTER}
Diffstat (limited to 'src/gui/DatabaseWidget.cpp')
-rw-r--r-- | src/gui/DatabaseWidget.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 042e2a561..3e1d3192b 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -799,6 +799,38 @@ void DatabaseWidget::performAutoType() } } +void DatabaseWidget::performAutoTypeUsername() +{ + auto currentEntry = currentSelectedEntry(); + if (currentEntry) { + autoType()->performAutoTypeWithSequence(currentEntry, QStringLiteral("{USERNAME}"), window()); + } +} + +void DatabaseWidget::performAutoTypeUsernameEnter() +{ + auto currentEntry = currentSelectedEntry(); + if (currentEntry) { + autoType()->performAutoTypeWithSequence(currentEntry, QStringLiteral("{USERNAME}{ENTER}"), window()); + } +} + +void DatabaseWidget::performAutoTypePassword() +{ + auto currentEntry = currentSelectedEntry(); + if (currentEntry) { + autoType()->performAutoTypeWithSequence(currentEntry, QStringLiteral("{PASSWORD}"), window()); + } +} + +void DatabaseWidget::performAutoTypePasswordEnter() +{ + auto currentEntry = currentSelectedEntry(); + if (currentEntry) { + autoType()->performAutoTypeWithSequence(currentEntry, QStringLiteral("{PASSWORD}{ENTER}"), window()); + } +} + void DatabaseWidget::openUrl() { auto currentEntry = currentSelectedEntry(); |