D8056: Improve usability of "Open With" dialog by adding option to filter the application tree

Simone Gaiarin noreply at phabricator.kde.org
Mon Nov 6 19:32:28 UTC 2017


simgunz marked an inline comment as done.
simgunz added a comment.


  @rkflx I agree on all your points.
  
  In general I also prefer to have the categories. Implementing what you propose will require a bit of time. Basically if we want any behavior different from the current one, we need to replace the `QTreeView` with a `QListView` every time some text is typed in the `QLineEdit`.
  
  I agree in opening a new task to talk about the proposed points.
  
  For this patch everything should be ok, now. I also fixed the `QRegExp` point.
  
  Just for my mental sanity, what is the remarkup syntax to make the ESC key? key Esc or Escape shows a hammer and sickle :-)

INLINE COMMENTS

> rkflx wrote in kopenwithdialog.cpp:826
> @simgunz This is marked as done, but still uses `QRegExp` and not `QRegularExpression`?

I was using the regular expression only to provide cases insensitive filter, but I saw now I can achieve it with fixed string filter as well.

The interface of the method `setFilterRegExp` only accepts `QRegExp`.

Thanks for pointing this out.

> rkflx wrote in kopenwithdialog.cpp:1099
> Is this a "fixme-before-commit" or a "fixme-sometimes-in-the-future" FIXME?

It is a fixme-sometimes-in-the-future. Actually I am not even sure how much of a problem that is, so any other opinion is welcomed.

To be more clear on this point. Currently [↓] moves the focus to the tree view, while [↑] moves it back in the line edit history of commands. When the search provides no results, [↓] moves forward in the history. This is true for any completion type.

Before my changes, [↓] was just moving forward in the history of commands.

When we use CompletionPopup or CompletionPopupAuto we want [↓] to let use navigate the entries in the popup, so it shouldn't be used to focus on the treeview. At this point there are two possibilities:

1. We hit [Enter] and select an entry. The popup closes, and in the tree there will be likely a single result if the command chosen has also a desktop entry, or no results if the command is a shell command
2. We hit `Esc` and in the line edit there is a piece of text that may match something in the tree view

At this point, once the popup is closed, one could use [↓] to focus the tree view, but currently [↓] is disabled. So in this sense the behavior is not consistent with the cases where other completion modes are used. (Note that when the popup  is closed [↓] does not open it again, only typing more text opens it)

REPOSITORY
  R241 KIO

BRANCH
  openwithdialog-filter-app-tree

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

To: simgunz, dfaure, #frameworks, #vdg, ngraham
Cc: rkflx, subdiff, fabianr, abetts, ngraham, alexeymin, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171106/4c2e45ec/attachment.html>


More information about the Kde-frameworks-devel mailing list