refactor about-distro to more generically support textual dumps
ClosedPublic

Authored by sitter on Jan 14 2020, 3:35 PM.

Details

Summary

this previously relied on manually replicating strings and whatnot, it was
very awkward to read and the load functions were also getting a bit long.

introducing the new entry system:
generic table entries are now represented by a more generic Entry object
comprised of the entry label (e.g. 'Plasma Version:') and its value
(e.g. '5.17.0'). from those entries the UI is then constructed (i.e.
large parts of the UI are now no longer in the designer file but rather
constructed manually).
all visible entries are further more collected in a global list of entries
from which we'll generate the clipboard dump.
localization switching is now carried out through KLocalized String instead
of having string copies floating about. depending on context we'll either
resolve the localized or original string.

this should also make it easier to change the data set in the future, be
it adding or removing new data

RTL languages have a broken clipboard but it looks that was the case before
as well and I utterly failed to bend it into shape with bidirectional
control characters :(

Test Plan
  1. LANGUAGE=en
  2. all entires shown
  3. copy to clipboard dumps all entries as before
  1. LANGUAGE=de
  2. as above
  3. copy to as english dumps in english rather than german
  1. LANGUAGE=he
  2. as above
  3. copy in hebrew seems incorrectly order (probably because bidi algorithm falls over from both the RTL label being in the same line as the LTR numbers)

Diff Detail

Repository
R102 KInfoCenter
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21175
Build 21193: arc lint + arc unit
sitter created this revision.Jan 14 2020, 3:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 14 2020, 3:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Jan 14 2020, 3:35 PM

not sure if it's worth splitting into multiple files. personally I prefer many tiny files over one long one though *shrug*.

sitter updated this revision to Diff 73602.Jan 15 2020, 9:27 AM

forgot to actually write cleanup after having wanted to twice :'D

sitter updated this revision to Diff 73707.Jan 16 2020, 2:42 PM

split into one class per file

sitter updated this revision to Diff 73708.Jan 16 2020, 2:48 PM

remove extra file

Last chance to object.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 5 2020, 9:52 AM
This revision was automatically updated to reflect the committed changes.