mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-23 14:24:50 -04:00
Implement support for auto-type {{} and {}}
This commit is contained in:
parent
beba23ea2e
commit
89382f6306
1 changed files with 5 additions and 4 deletions
|
@ -142,6 +142,9 @@ void AutoType::performAutoType(const Entry* entry, QWidget* hideWindow, const QS
|
||||||
sequence = customSequence;
|
sequence = customSequence;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sequence.replace("{{}", "{LEFTBRACE}");
|
||||||
|
sequence.replace("{}}", "{RIGHTBRACE}");
|
||||||
|
|
||||||
QList<AutoTypeAction*> actions;
|
QList<AutoTypeAction*> actions;
|
||||||
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
||||||
|
|
||||||
|
@ -317,8 +320,6 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
||||||
|
|
||||||
|
|
||||||
for (const QChar& ch : sequence) {
|
for (const QChar& ch : sequence) {
|
||||||
// TODO: implement support for {{}, {}}
|
|
||||||
|
|
||||||
if (inTmpl) {
|
if (inTmpl) {
|
||||||
if (ch == '{') {
|
if (ch == '{') {
|
||||||
qWarning("Syntax error in auto-type sequence.");
|
qWarning("Syntax error in auto-type sequence.");
|
||||||
|
@ -486,10 +487,10 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
|
||||||
else if (tmplName.compare(")",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare(")",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar(')'));
|
list.append(new AutoTypeChar(')'));
|
||||||
}
|
}
|
||||||
else if (tmplName.compare("{",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("leftbrace",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar('{'));
|
list.append(new AutoTypeChar('{'));
|
||||||
}
|
}
|
||||||
else if (tmplName.compare("}",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("rightbrace",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar('}'));
|
list.append(new AutoTypeChar('}'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue