From 940a5026c1d86c092f9ebabc795891f3e68bd613 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Fri, 13 Mar 2015 22:24:29 +0100 Subject: [PATCH] Properly auto-type line breaks and tabs in text. --- src/autotype/AutoType.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 2143eca76..ce68ae471 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -477,7 +477,15 @@ QList AutoType::createActionFromTemplate(const QString& tmpl, c QString resolved = entry->resolvePlaceholders(placeholder); if (placeholder != resolved) { Q_FOREACH (const QChar& ch, resolved) { - list.append(new AutoTypeChar(ch)); + if (ch == '\n') { + list.append(new AutoTypeKey(Qt::Key_Enter)); + } + else if (ch == '\t') { + list.append(new AutoTypeKey(Qt::Key_Tab)); + } + else { + list.append(new AutoTypeChar(ch)); + } } }