D10499: [spellcheck runner] Make each suggestion copyable as separate item

2018-02-22 Thread Friedrich W . H . Kossebau
This revision was automatically updated to reflect the committed changes.
Closed by commit R114:66eb115a9300: [spellcheck runner] Make each suggestion 
copyable as separate item (authored by kossebau).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D10499?vs=27127=27772#toc

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10499?vs=27127=27772

REVISION DETAIL
  https://phabricator.kde.org/D10499

AFFECTED FILES
  runners/spellchecker/spellcheck.cpp
  runners/spellchecker/spellcheck.h

To: kossebau, broulik
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D10499: [spellcheck runner] Make each suggestion copyable as separate item

2018-02-21 Thread Friedrich W . H . Kossebau
kossebau added a comment.


  Thanks for review.
  
  In D10499#210493 , @broulik wrote:
  
  > >   and then copy the correct or suggested into the clipboard for further 
usage?
  >
  > Calculator runner does `setText` on `QClipboard` in `run`, so I guess this 
is the way.
  
  
  Which seems to not be triggered when chosing the match though, from what I 
tested incl. extra debug log.
  
  Currently one has to use the action enabled on the match to get the result 
copied to the clipboard.
  
  So chance is that code is dead code, either due to being copy on plugin 
creation or due to policy changes in krunner plasma5 porting?
  
  > `InformationalMatch` causes the `data` to be set as query when run. Pick 
your poison.
  
  I guess that most use cases with this runner are when someone wants to use to 
correct term in other places, so on selecting the match people do not intend to 
have it as new query content for further queries, but have the term straight 
available for use in that other place (-> clipboard).
   So considering to take the HelperMatch pill. Though might also go for extra 
copy action as with calculator.

REPOSITORY
  R114 Plasma Addons

BRANCH
  spellrunnerMakeTermsCopyable

REVISION DETAIL
  https://phabricator.kde.org/D10499

To: kossebau, broulik
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D10499: [spellcheck runner] Make each suggestion copyable as separate item

2018-02-20 Thread Kai Uwe Broulik
broulik accepted this revision.
broulik added a comment.
This revision is now accepted and ready to land.


  >   and then copy the correct or suggested into the clipboard for further 
usage?
  
  Calculator runner does `setText` on `QClipboard` in `run`, so I guess this is 
the way.
  `InformationalMatch` causes the `data` to be set as query when run. Pick your 
poison.

INLINE COMMENTS

> spellcheck.cpp:225
> +match.setText(query);
> +match.setSubtext(i18n("Correct"));
> +match.setData(query);

Add some context, "Correct" could also be a verb

REPOSITORY
  R114 Plasma Addons

BRANCH
  spellrunnerMakeTermsCopyable

REVISION DETAIL
  https://phabricator.kde.org/D10499

To: kossebau, broulik
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D10499: [spellcheck runner] Make each suggestion copyable as separate item

2018-02-13 Thread Friedrich W . H . Kossebau
kossebau added inline comments.

INLINE COMMENTS

> spellcheck.cpp:222
> +Plasma::QueryMatch match(this);
> +match.setType(Plasma::QueryMatch::HelperMatch);
>  match.setIconName(QStringLiteral("checkbox"));

Not sure if HelperMatch is the correct thing here. Similar runners use 
InformationalMatch here, so on selection the term is copied into the runner.

What is the modern krunner way to support the use-case of someone wanting to 
know the spelling of some word, and then copy the correct or suggested into the 
clipboard for further usage?

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10499

To: kossebau, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D10499: [spellcheck runner] Make each suggestion copyable as separate item

2018-02-13 Thread Friedrich W . H . Kossebau
kossebau created this revision.
kossebau added a reviewer: broulik.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  Before all suggestions are only shown as single item with a text of
  comma-separated terms. So one cannot select a single suggested term and e.g.
  copy it to the clipboard
  
  And if correct term, the term is not copyable directly as well.

TEST PLAN
  Activate spellcheck runner (disabled by default), enter
  "spell Compilcated" or similar
  and select spellchecker menu items.

REPOSITORY
  R114 Plasma Addons

BRANCH
  spellrunnerMakeTermsCopyable

REVISION DETAIL
  https://phabricator.kde.org/D10499

AFFECTED FILES
  runners/spellchecker/spellcheck.cpp

To: kossebau, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart