[krunner] Bring back history

Review Request #123888 - Created May 23, 2015 and submitted

Kai Uwe Broulik
plasma, usability

This turns KRunner's TextField into an editable ComboBox to provide a history.

When a result is invoked, the query string is prepended to the history, query strings are only added once. ComboBox provides letter-by-letter auto completion.

Somehow I have a feeling it doesn't always save the history or nukes it at times. It also has some shortcomings due to ComboBox:

1.) You cannot use the arrow keys to cycle between entries (when the popup's not opened) because arrow keys navigate through results
2.) forceActiveFocus() on the ComboBox will not activate the embedded TextField - when you had opened the popup there's a slight chance the input field won't get focussed I'll prepare a Qt patch for this.
3.) Before Qt 5.4.2 (not sure if my patch ended up in 5.4.1) pressing space in the edit combobox will open the popup, not insert a space (nasty show stopper)
4.) Plasma's edtiable ComboBox looks a bit strange imho
5.) Plasma's editable ComboBox doesn't support clearButtonShown
6.) Plasma's ComboBox has strange bullets and margins in it, that's probably a bug in Plasma Style (need to look what Desktop style does differently from us)
7.) ComboBox doesn't have a cursorPosition, I'll prepare a Qt patch for this.



  • 2
  • 1
  • 1
  • 4
Description From Last Updated
const QStringList &history() const; Saves a copy and prevents users from manipulating this object. You do manipulate this, but that ... Mark Gaiser Mark Gaiser
We need the cursor position to be updated for runners which change the query string. You can test this out ... Vishesh Handa Vishesh Handa
Mark Gaiser
Kai Uwe Broulik
Heiko Tietze
Vishesh Handa
Marco Martin
Kai Uwe Broulik
Kai Uwe Broulik
Kai Uwe Broulik
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 2d2a79390d8bafeda8dc1ce30fd4bc40eafaea57 by Kai Uwe Broulik to branch master.