Commit b3b26e75 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use higher match priority and copy suggested text

parent d67a5ba3
...@@ -223,7 +223,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context) ...@@ -223,7 +223,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
const bool correct = speller->checkAndSuggest(query,suggestions); const bool correct = speller->checkAndSuggest(query,suggestions);
if (correct) { if (correct) {
Plasma::QueryMatch match(this); Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::InformationalMatch); match.setType(Plasma::QueryMatch::ExactMatch);
match.setIconName(QStringLiteral("checkbox")); match.setIconName(QStringLiteral("checkbox"));
match.setText(query); match.setText(query);
match.setSubtext(i18nc("Term is spelled correctly", "Correct")); match.setSubtext(i18nc("Term is spelled correctly", "Correct"));
...@@ -232,7 +232,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context) ...@@ -232,7 +232,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
} else { } else {
for (const auto& suggestion : qAsConst(suggestions)) { for (const auto& suggestion : qAsConst(suggestions)) {
Plasma::QueryMatch match(this); Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::InformationalMatch); match.setType(Plasma::QueryMatch::ExactMatch);
match.setIconName(QStringLiteral("edit-rename")); match.setIconName(QStringLiteral("edit-rename"));
match.setText(suggestion); match.setText(suggestion);
match.setSubtext(i18n("Suggested term")); match.setSubtext(i18n("Suggested term"));
...@@ -242,7 +242,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context) ...@@ -242,7 +242,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
} }
} else { } else {
Plasma::QueryMatch match(this); Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::InformationalMatch); match.setType(Plasma::QueryMatch::ExactMatch);
match.setIconName(QStringLiteral("data-error")); match.setIconName(QStringLiteral("data-error"));
match.setText(i18n("No dictionary found, please install hspell")); match.setText(i18n("No dictionary found, please install hspell"));
context.addMatch(match); context.addMatch(match);
......
Markdown is supported
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