mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-11 04:58:31 -04:00
fix autotype custom attributes
This commit is contained in:
parent
d3a80513a7
commit
5f9f27604b
2 changed files with 29 additions and 19 deletions
|
@ -659,6 +659,7 @@ bool AutoType::checkSyntax(const QString& string)
|
|||
QString delay = "DELAY=\\d+";
|
||||
QString beep = "BEEP\\s\\d+\\s\\d+";
|
||||
QString vkey = "VKEY(?:-[EN]X)?\\s\\w+";
|
||||
QString customAttributes = "S:(?:[^\\{\\}])+";
|
||||
|
||||
// these chars aren't in parentheses
|
||||
QString shortcutKeys = "[\\^\\%~\\+@]";
|
||||
|
@ -666,7 +667,7 @@ bool AutoType::checkSyntax(const QString& string)
|
|||
QString fixedStrings = "[^\\^\\%~\\+@\\{\\}]*";
|
||||
|
||||
QRegularExpression autoTypeSyntax("^(?:" + shortcutKeys + "|" + fixedStrings + "|\\{(?:" + normalCommands + "|" + specialLiterals +
|
||||
"|" + functionKeys + "|" + numpad + "|" + delay + "|" + beep + "|" + vkey + ")\\})*$",
|
||||
"|" + functionKeys + "|" + numpad + "|" + delay + "|" + beep + "|" + vkey + ")\\}|\\{" + customAttributes + "\\})*$",
|
||||
QRegularExpression::CaseInsensitiveOption);
|
||||
QRegularExpressionMatch match = autoTypeSyntax.match(string);
|
||||
return match.hasMatch();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue