D15115: fix translations kcm to be usable on new users/installations

Harald Sitter noreply at phabricator.kde.org
Tue Aug 28 10:18:13 BST 2018


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

REVISION SUMMARY
  this broke somewhat recently. the new availabletranslationsmodel's
  rowcount is always 0 on a completely fresh system with no language
  preference set. this is because the actual available languages list is
  only compiled in its ::setSelectedLanguages function. this function was
  however never called. this resulted in the kcm thinking there are no
  available languages and thus making it impossible to actually add one by
  disabling the button and having an empty view even if the button wasn't
  disabled.
  
  previously this was a single model, from what I can see, and that was
  incorrectly ported. where previously the setSelectedLanguages was only
  called on one model we now need to call it on all models to properly
  propagate the language information.
  
  (the reason it works this way is because available languages kinda need to
   include already selected languages for consistency; even when the kcm
   technically didn't find them available)

TEST PLAN
  - make new user
  - start kcm
  - kcm DOES NOT show infobox 'no languages installed' and the add languages button is enabled
  - clicking the button gives a list of languages
  - adding one works as well

REPOSITORY
  R119 Plasma Desktop

BRANCH
  master

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

AFFECTED FILES
  kcms/translations/translations.cpp

To: sitter, hein
Cc: plasma-devel, 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/20180828/69cb6e3d/attachment-0001.html>


More information about the Plasma-devel mailing list