<table><tr><td style="">sitter created this revision.<br />sitter added a reviewer: hein.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />sitter requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15115">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>this broke somewhat recently. the new availabletranslationsmodel's<br />
rowcount is always 0 on a completely fresh system with no language<br />
preference set. this is because the actual available languages list is<br />
only compiled in its ::setSelectedLanguages function. this function was<br />
however never called. this resulted in the kcm thinking there are no<br />
available languages and thus making it impossible to actually add one by<br />
disabling the button and having an empty view even if the button wasn't<br />
disabled.</p>
<p>previously this was a single model, from what I can see, and that was<br />
incorrectly ported. where previously the setSelectedLanguages was only<br />
called on one model we now need to call it on all models to properly<br />
propagate the language information.</p>
<p>(the reason it works this way is because available languages kinda need to<br />
include already selected languages for consistency; even when the kcm<br />
technically didn't find them available)</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">make new user</li>
<li class="remarkup-list-item">start kcm</li>
<li class="remarkup-list-item">kcm DOES NOT show infobox 'no languages installed' and the add languages button is enabled</li>
<li class="remarkup-list-item">clicking the button gives a list of languages</li>
<li class="remarkup-list-item">adding one works as well</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15115">https://phabricator.kde.org/D15115</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/translations/translations.cpp</div></div></div><br /><div><strong>To: </strong>sitter, hein<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>