From 5cdac6be4da7de359346bb2700178bd368eb4062 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Tue, 27 Aug 2024 23:02:12 -0400 Subject: [PATCH] fix: slob description html display --- src/dict/slob.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/dict/slob.cc b/src/dict/slob.cc index 5f19b564..3ccdc3ce 100644 --- a/src/dict/slob.cc +++ b/src/dict/slob.cc @@ -726,14 +726,8 @@ QString const & SlobDictionary::getDescription() if ( !dictionaryDescription.isEmpty() ) return dictionaryDescription; - QMap< QString, QString > const & tags = sf.getTags(); - - QMap< QString, QString >::const_iterator it; - for ( it = tags.begin(); it != tags.end(); ++it ) { - if ( it != tags.begin() ) - dictionaryDescription += "\n\n"; - - dictionaryDescription += it.key() + ": " + it.value(); + for ( auto [ key, value ] : sf.getTags().asKeyValueRange() ) { + dictionaryDescription += "" % key % "" % ": " % value % "
"; } return dictionaryDescription;