DevHeads.net

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

Review request for kde-workspace.

Bugs: 222266 and 299472
<a href="http://bugs.kde.org/show_bug.cgi?id=222266" title="http://bugs.kde.org/show_bug.cgi?id=222266">http://bugs.kde.org/show_bug.cgi?id=222266</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=299472" title="http://bugs.kde.org/show_bug.cgi?id=299472">http://bugs.kde.org/show_bug.cgi?id=299472</a>

Repository: kde-workspace

Description
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.

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

Diff: <a href="https://git.reviewboard.kde.org/r/117909/diff/" title="https://git.reviewboard.kde.org/r/117909/diff/">https://git.reviewboard.kde.org/r/117909/diff/</a>

Testing

Thanks,

Renato Atilio