D19160: [about-distro] update osrelease parser for latest values in spec
Harald Sitter
noreply at phabricator.kde.org
Tue Feb 19 15:04:05 GMT 2019
sitter created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.
REVISION SUMMARY
+ and add a simple unit test so one can refactor without fear of regressing
something :((
- osrelease now takes an optional filepath as ctor argument to enable dummy data for testing
- instead of exhaustively if-deffing the config keys are now mapped to member variables in a hash and then resolved through that. this makes the mapping a bit more readable but most importantly reduces the syntactic cruft around it so as to make everything easier to copy paste without messing up by not seeing the important elements clearly
- all currently supported values are now under test
among the newly supported keys is LOGO which we'll be able to use for
our logo \o/
REPOSITORY
R102 KInfoCenter
BRANCH
os-relesae
REVISION DETAIL
https://phabricator.kde.org/D19160
AFFECTED FILES
Modules/about-distro/CMakeLists.txt
Modules/about-distro/autotests/CMakeLists.txt
Modules/about-distro/autotests/OSReleaseTest.cpp
Modules/about-distro/autotests/data/os-release
Modules/about-distro/src/OSRelease.cpp
Modules/about-distro/src/OSRelease.h
To: sitter
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190219/4ddf0648/attachment.html>
More information about the Plasma-devel
mailing list