From c72781a4da2401fb2e95ccf63bd134af0d208e3c Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 25 Nov 2017 20:28:12 +0100 Subject: [PATCH] Dict engine: remove double quotes around dictionary descriptions. They don't look good in the (future) GUI. --- dataengines/dict/dictengine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dataengines/dict/dictengine.cpp b/dataengines/dict/dictengine.cpp index 7cb4e145e..7581fe654 100644 --- a/dataengines/dict/dictengine.cpp +++ b/dataengines/dict/dictengine.cpp @@ -170,7 +170,11 @@ void DictEngine::getDicts() if (!curr.startsWith('-') && !curr.startsWith('.')) { const QString line = QString::fromUtf8(curr).trimmed(); const QString id = line.section(' ', 0, 0); - const QString description = line.section(' ', 1); + QString description = line.section(' ', 1); + if (description.startsWith('"') && description.endsWith('"')) { + description.remove(0, 1); + description.chop(1); + } setData(QStringLiteral("list-dictionaries"), id, description); // this is additive } }