Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit f1ca0ea4 authored by Harald Sitter's avatar Harald Sitter 🌼 Committed by Eike Hein

fix translations kcm to be usable on new users/installations

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

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:
parent fc23cb30
......@@ -84,6 +84,7 @@ void Translations::load()
m_configuredLanguages = m_config.readEntry(lcLanguage,
QString()).split(QLatin1Char(':'), QString::SkipEmptyParts);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment