fix translations kcm to be usable on new users/installations

Authored by sitter on Sep 13 2018, 5:03 PM.

Description

fix translations kcm to be usable on new users/installations

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

Reviewers: sitter

Subscribers: ngraham, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D15115

Details

Committed
heinSep 13 2018, 5:03 PM
Differential Revision
D15115: fix translations kcm to be usable on new users/installations
Parents
R119:fde65b4efaac: Update version number for 5.13.90 GIT_SILENT
Branches
Unknown
Tags
Unknown
References
tag: v5.13.90