[kfilewidget] Return editable URL navigator to breadcrumb mode if it has focus and everything is selected and when Ctrl+L is pressed
ClosedPublic

Authored by ngraham on Nov 18 2018, 4:01 PM.

Details

Summary

Currently, Ctrl++ toggles the location bar between editable and breadcrumb modes, which is nice. However, it does this even when the URL bar is not focused, which can lead to times when you want to enter a path and instead accidentally make it un-editable, oops.

This patch refines the behavior so that it only toggles the mode when the location bar has focus and everything is selected. This brings the behavior into 100% consistency with Dolphin, once D16980 lands.

Test Plan
  • Compile and deploy
  • Open a file open/save dialog and make the location bar be breadcrumbs
  • Hit Ctrl+L twice in a row -> location field turns to being in breadcrumb mode. Focus is correctly returned to the main view.
  • Hit Ctrl+L, move focus elsewhere, then hit Ctrl+L again -> Location bar is editable and focused with everything selected.
  • Hit Ctrl+L, deselect some of the text, then hit Ctrl+L again -> Location bar selects everything.

Diff Detail

Repository
R241 KIO
Branch
arcpatch-D16981
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5740
Build 5758: arc lint + arc unit
ngraham created this revision.Nov 18 2018, 4:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 18 2018, 4:01 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ngraham requested review of this revision.Nov 18 2018, 4:01 PM
ngraham updated this revision to Diff 46931.Dec 6 2018, 2:54 AM

Match the behavior of D16980

ngraham retitled this revision from [kfilewidget] Ctrl+L returns editable URL navigator to breadcrumb mode only when it has focus to [kfilewidget] Return editable URL navigator to breadcrumb mode if it has focus and everything is selected and when Ctrl+L is pressed.Dec 6 2018, 2:55 AM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)
ngraham updated this revision to Diff 46932.Dec 6 2018, 2:57 AM

Add a comment for clarity

Landing this too since its Dolphin companion (D16980) has been accepted, and the code change is virtually identical.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 16 2018, 8:58 PM
This revision was automatically updated to reflect the committed changes.