Add timezone filtering by region too

Review Request #123740 - Created May 12, 2015 and submitted

Martin Klapetek

Adds a simple QSortFilterProxyModel on top of TimeZonesModel and reimplements filterAcceptsRow using QStringMatcher (supposedly faster according to qtdocs).

Sidenote: Originally I did try to implement this using the "filterCallback" in PlasmaCore.SortFilterModel, but this worked very very wonkily. Basically on "z" it would match correctly, on "zu" the list is suddenly empty. Sometimes. No matter what I tried, I couldn't get that to work and work reliably (it also requires changes in plasma-framework to call the invalidate() after each char is typed in and a "get(int row)" function in the TimeZoneModel). After spending manymany hours on this, I just went for this simple 50 lines addition instead. And it just works (tm).

Timezones are now correctly filtered by both city and region.


  • 0
  • 1
  • 0
  • 1
Description From Last Updated
David Edmundson
Martin Klapetek
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 72041b7c90c3f4e1d1ec6812813dee84952f3f89 by Martin Klapetek to branch Plasma/5.3.