From 5b32132762cdaeb558833d5e36629b4248d4be48 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 13 Aug 2013 22:13:30 +0200 Subject: Fix escaped compose key parsing This patch fixes the issue when the escape '\' character was interpreted as a compose value. On the whole en_US.UTF-8 Compose file it only affects the following sequences: : "\"" quotedbl # REVERSE SOLIDUS : "\\" backslash # REVERSE SOLIDUS : "\\" backslash # REVERSE SOLIDUS : "\\" backslash # REVERSE SOLIDUS By coincidence the last 3 sequences were working even before this fix. Task-number: QTBUG-32972 Change-Id: Ia4fc2156d982cf2918d0d1be6ee07706cfbfd091 Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- .../platforminputcontexts/compose/generator/qtablegenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp index f746207cc0..803faaf08a 100644 --- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp @@ -342,7 +342,8 @@ void TableGenerator::parseKeySequence(QString line) } } else { // handle direct text encoded in the locale - elem.value = valueType.unicode(); + const QChar localeValueType = (valueType == '\\') ? line.at(composeValueIndex + 1) : valueType; + elem.value = localeValueType.unicode(); } // find the comment -- cgit v1.2.3