Diffusion KIO efa5438e39bb

[KOpenWithDialog] Automatically select the result if the model filter has only…

Authored by ahmadsamir on Feb 3 2020, 7:17 AM.

Description

[KOpenWithDialog] Automatically select the result if the model filter has only one match

Summary:
If the user types some text in the lineEdit and there's more than one
match in the model view, don't automatically select the first match, so
that if the user presses Enter/Return, we don't load the first result
as it could well be not what the user actually wants.

BUG: 400725

Test Plan:

  • Make sure ark and wireshark are installed on your system
  • Invoke the open-with dialog on any archive file, and type ark
  • You should get two results (or three if Ark is present in two individual categories on your system...) WireShark and Ark, with the former being automatically selected for you
  • Press Enter, the file is opened with wireshark
  • Apply the diff then try again, the open-with dialog will not select the first result, and if you press Enter the dialog will open the file using the command you typed

Reviewers: dfaure, ngraham, Frameworks, VDG

Reviewed By: dfaure

Subscribers: ngraham, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D24951