Bug 413826

Summary: Can't pick default application from list after typing text in search box
Product: [Applications] systemsettings Reporter: elman
Component: kcm_componentchooserAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs, meven29, nate
Priority: NOR    
Version: 5.17.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.19
Sentry Crash Report:
Attachments: Application picker

Description elman 2019-11-05 09:00:30 UTC
Created attachment 123728 [details]
Application picker

SUMMARY
When choosing new default application, application is not correctly picked from list.

STEPS TO REPRODUCE
1. Open kcm Applications
2. Go to Default Applications / Email Client / Use a different email client
3. Click ... button
4. Start filtering applications ("evo" in my case)
5. Click Evolution in application tree
6. Click OK

OBSERVED RESULT
"evo" is copied to input for different email client

EXPECTED RESULT
Full name "evolution" should be copied to input

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro stable
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Comment 1 Christoph Feck 2019-11-05 22:29:50 UTC
How came investigation to the conclusion that the bug is in KWidgetsAddons? Does KOpenWithDialog use a widget from KWidgetsAddon that shows the issue?

From quickly checking, it uses KHistoryComboBox from KCompletion framework, but I didn't investigate if the bug is there or in KOpenWithDialog.
Comment 2 Nate Graham 2019-11-05 22:38:28 UTC
My bad, I forgot that KOpenWithDialog lives in KIO. Moving it there.

As far as I can tell, there are two problems here:

1. Clicking on the OK button returns the text in the KHistoryCombobox, not the currently-selected item in the list below it.

2. Using a KHistoryCombobox in the first place is inappropriate, since it's being abused as a search/filter field to narrow the list of apps below it, but the field's own history/autocomplete features interfere with this.
Comment 3 Méven Car 2020-01-21 09:29:38 UTC
Fixed by https://phabricator.kde.org/D26565

The bug originated in the kcm componentchooser that did not a great job at reading KOpenWithDialog result.
The new UI is way simpler and does not leave room for such cases.