Review Request 127952: add a function to override the current theme heuristics with a static value

Harald Sitter sitter at kde.org
Wed May 18 10:30:54 UTC 2016


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

(Updated May 18, 2016, 10:30 a.m.)


Review request for KDE Frameworks and Christoph Feck.


Changes
-------

change function name to forceThemeForTests to make it clearer that this method is meant to be used for tests


Repository: kiconthemes


Description
-------

this allows unit tests to force a specific name to be used regardless of
which branch of the current() resolution would bite first. the override
wins and that is that.

in particular this allows unit tests to force a fake theme


NOTES:
- this approach means tests need to be explicitly adapted to this new thing (e.g. https://paste.kde.org/pjzwg47s7)
- another approach would be to have a switch to disable qicon::theme entirely, which has the advantage of not requiring additional changes to other tests
- the presented approach in the long run (with possibly a bit more rigging in kiconloader) allow a test to force all it's kiconthemes magic to use a given theme without having to touch kdeglobals or running manually reconfigures etc.
- both viable, I like this one better though
- ::overrideCurrent would be another possible name but ::force sounds more like what it ultimately does in terms of impact


Diffs (updated)
-----

  autotests/CMakeLists.txt 7af101398774bd138fe57f3765416cfcfb022f75 
  autotests/kicontheme_unittest.cpp PRE-CREATION 
  src/kicontheme.h dafece91f401ea0f8188613c55ee92d96d293879 
  src/kicontheme.cpp f3d4cf71c05fe143464952bec89497fb911f2291 

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


Testing
-------

unit test + adapted plasma-framework's themetest to use this


Thanks,

Harald Sitter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160518/caab3ffc/attachment.html>


More information about the Kde-frameworks-devel mailing list