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

Eike Hein noreply at phabricator.kde.org
Thu Sep 13 18:01:25 BST 2018


hein added a comment.


  This makes sense. In theory this is done by this code:
  
  `    connect(m_selectedTranslationsModel, &SelectedTranslationsModel::selectedLanguagesChanged,
  
    m_availableTranslationsModel, &AvailableTranslationsModel::setSelectedLanguages);`
  
  However `SelectedTranslationsModel` only emits the signal when the list has changed, and an initial call to `setSelectedLanguages` with both the member and the parameter being empty doesn't cause an emit.
  
  This means your patch can be simplified though. Only the `Translations::load()` needs to call `AvailableTranslationsModel::setSelectedLanguages` to seed things, `save` and `defaults` are covered by the signal-slot connection keeping the models in sync.

REPOSITORY
  R119 Plasma Desktop

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

To: sitter, hein
Cc: ngraham, 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/20180913/c42abb2f/attachment.html>


More information about the Plasma-devel mailing list