Review Request 123740: Add timezone filtering by region too

Martin Klapetek martin.klapetek at gmail.com
Tue May 12 20:05:27 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123740/
-----------------------------------------------------------

Review request for Plasma.


Bugs: 346681
    https://bugs.kde.org/show_bug.cgi?id=346681


Repository: plasma-workspace


Description
-------

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


Diffs
-----

  applets/digital-clock/package/contents/ui/configTimeZones.qml ef04381 
  applets/digital-clock/plugin/digitalclockplugin.cpp d4bfad4 
  applets/digital-clock/plugin/timezonemodel.h 761d78d 
  applets/digital-clock/plugin/timezonemodel.cpp 27698a3 

Diff: https://git.reviewboard.kde.org/r/123740/diff/


Testing
-------

Timezones are now correctly filtered by both city and region.


Thanks,

Martin Klapetek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150512/85118979/attachment.html>


More information about the Plasma-devel mailing list