D26667: refactor about-distro to more generically support textual dumps

Harald Sitter noreply at phabricator.kde.org
Tue Jan 14 15:35:57 GMT 2020


sitter created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

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

REPOSITORY
  R102 KInfoCenter

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D26667

AFFECTED FILES
  Modules/about-distro/src/Module.cpp
  Modules/about-distro/src/Module.h
  Modules/about-distro/src/Module.ui

To: sitter
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200114/e9836ca9/attachment.html>


More information about the Plasma-devel mailing list