Verified Commit 579e4b94 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

dictionaryrunner: Display definitions as multiline text

FEATURE: 395376
FIXED-IN: 5.22
parent cf260a43
......@@ -74,11 +74,11 @@ void DictionaryRunner::match(Plasma::RunnerContext &context)
lastPartOfSpeech = partOfSpeech.cap(1);
}
Plasma::QueryMatch match(this);
match.setText(query + QLatin1String(": ") + lastPartOfSpeech);
match.setMultiLine(true);
match.setText(lastPartOfSpeech + QLatin1String(": ") + partOfSpeech.cap(2));
match.setRelevance(1 - (static_cast<double>(++item) / static_cast<double>(lines.length())));
match.setType(Plasma::QueryMatch::InformationalMatch);
match.setIconName(QStringLiteral("accessories-dictionary"));
match.setSubtext(partOfSpeech.cap(2));
matches.append(match);
}
context.addMatches(matches);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment