Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
Plasma Add-ons
Commits
62730341
Commit
62730341
authored
Oct 09, 2020
by
Alexander Lohnau
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use higher match priority and copy suggested text
parent
158386f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
runners/spellchecker/spellcheck.cpp
runners/spellchecker/spellcheck.cpp
+3
-3
No files found.
runners/spellchecker/spellcheck.cpp
View file @
62730341
...
...
@@ -215,7 +215,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
const
bool
correct
=
speller
->
checkAndSuggest
(
query
,
suggestions
);
if
(
correct
)
{
Plasma
::
QueryMatch
match
(
this
);
match
.
setType
(
Plasma
::
QueryMatch
::
Informational
Match
);
match
.
setType
(
Plasma
::
QueryMatch
::
Exact
Match
);
match
.
setIconName
(
QStringLiteral
(
"checkbox"
));
match
.
setText
(
query
);
match
.
setSubtext
(
i18nc
(
"Term is spelled correctly"
,
"Correct"
));
...
...
@@ -224,7 +224,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
}
else
{
for
(
const
auto
&
suggestion
:
qAsConst
(
suggestions
))
{
Plasma
::
QueryMatch
match
(
this
);
match
.
setType
(
Plasma
::
QueryMatch
::
Informational
Match
);
match
.
setType
(
Plasma
::
QueryMatch
::
Exact
Match
);
match
.
setIconName
(
QStringLiteral
(
"edit-rename"
));
match
.
setText
(
suggestion
);
match
.
setSubtext
(
i18n
(
"Suggested term"
));
...
...
@@ -234,7 +234,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
}
}
else
{
Plasma
::
QueryMatch
match
(
this
);
match
.
setType
(
Plasma
::
QueryMatch
::
Informational
Match
);
match
.
setType
(
Plasma
::
QueryMatch
::
Exact
Match
);
match
.
setIconName
(
QStringLiteral
(
"data-error"
));
match
.
setText
(
i18n
(
"No dictionary found, please install hspell"
));
match
.
setActions
(
m_actions
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment