Return editable URL navigator to breadcrumb mode if it has focus and everything…

Authored by ngraham on Dec 16 2018, 8:49 PM.

Description

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

Summary:
This patch makes an editable location bar return to breadcrumb mode when Ctrl+L is pressed, but only if the location bar currently has focus and everything is selected. Otherwise, it will simply return focus to it as before.

This provides a slightly easier way to make the location bar return to breadcrumbs mode

Test Plan:

  • Compile and deploy 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.

Reviewers: Dolphin, elvisangelaccio, dhaumann

Reviewed By: elvisangelaccio, dhaumann

Subscribers: elvisangelaccio, dhaumann, kfm-devel

Tags: Dolphin

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