Avoid emitting twice twice selectionChanged when keyboard changes the selection…

Authored by meven on Oct 20 2019, 10:35 AM.

Description

Avoid emitting twice twice selectionChanged when keyboard changes the selection, fix slotChangeCurrentItem

Summary:
In KItemListController::slotChangeCurrentItem searchFromNextItem use was bugged :

The two branches of if (searchFromNextItem) both looked for the next keyboard with indexForKeyboardSearch(text, currentIndex (the first one with just a +1 modulo).
But when searchFromNextItem is false, we are supposed to start to look for the next indexKeyboard from the start of the list 0, not from the currentIndex

Reviewers: elvisangelaccio, Dolphin

Reviewed By: elvisangelaccio, Dolphin

Subscribers: kfm-devel

Tags: Dolphin

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