fix: slob description html display
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled

This commit is contained in:
shenleban tongying 2024-08-27 23:02:12 -04:00
parent b68ea3f916
commit 5cdac6be4d

View file

@ -726,14 +726,8 @@ QString const & SlobDictionary::getDescription()
if ( !dictionaryDescription.isEmpty() ) if ( !dictionaryDescription.isEmpty() )
return dictionaryDescription; return dictionaryDescription;
QMap< QString, QString > const & tags = sf.getTags(); for ( auto [ key, value ] : sf.getTags().asKeyValueRange() ) {
dictionaryDescription += "<b>" % key % "</b>" % ": " % value % "<br>";
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();
} }
return dictionaryDescription; return dictionaryDescription;