Review Request 117909: "Arrow down" key works incorrectly in krunner

Review request for kde-workspace.

Bugs: 222266 and 299472
<a href="" title=""></a>
<a href="" title=""></a>

Repository: kde-workspace

Debugging this situation, I've noticed that every time this bug happened, m_searchTerm->currentIndex() on interfaces/default/interface.cpp:247 was something random (sometimes 20, sometimes 2, sometimes 19). It was index 1 before pressing the down key and going to the result scene, but after pressing the up key and re-focusing the history combo box, the index was something else.

The same situation happened sometimes on new searches - just Alt+F2, type something and press the down key, nothing happens because the currentIndex() is wrong.

The workaround on the patch is just a guarantee that the index is correct: on every focus in event on krunnerhistorycombobox, we reset the index while keeping the search term as before and the result scene open.

krunner/interfaces/default/krunnerhistorycombobox.h f129a8b
krunner/interfaces/default/krunnerhistorycombobox.cpp da9941c

Diff: <a href="" title=""></a>



Renato Atilio