From 89382f63064f2bd3eb151e5343a58e25a1c86689 Mon Sep 17 00:00:00 2001 From: Weslly Date: Sat, 8 Apr 2017 23:49:13 -0300 Subject: [PATCH] Implement support for auto-type {{} and {}} --- src/autotype/AutoType.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 25afccfe9..1d96377f5 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -142,6 +142,9 @@ void AutoType::performAutoType(const Entry* entry, QWidget* hideWindow, const QS sequence = customSequence; } + sequence.replace("{{}", "{LEFTBRACE}"); + sequence.replace("{}}", "{RIGHTBRACE}"); + QList actions; ListDeleter actionsDeleter(&actions); @@ -317,8 +320,6 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList AutoType::createActionFromTemplate(const QString& tmpl, c else if (tmplName.compare(")",Qt::CaseInsensitive)==0) { list.append(new AutoTypeChar(')')); } - else if (tmplName.compare("{",Qt::CaseInsensitive)==0) { + else if (tmplName.compare("leftbrace",Qt::CaseInsensitive)==0) { list.append(new AutoTypeChar('{')); } - else if (tmplName.compare("}",Qt::CaseInsensitive)==0) { + else if (tmplName.compare("rightbrace",Qt::CaseInsensitive)==0) { list.append(new AutoTypeChar('}')); } else {