D13101: Fix adding langs more than once within the same session.
This revision was automatically updated to reflect the committed changes. Closed by commit R119:150f8877ee42: Fix adding langs more than once within the same session. (authored by hein). REPOSITORY R119 Plasma Desktop CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D13101?vs=34837&id=34839 REVISION DETAIL https://phabricator.kde.org/D13101 AFFECTED FILES kcms/translations/package/contents/ui/main.qml To: hein, davidedmundson Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D13101: Fix adding langs more than once within the same session.
hein added a comment. There's no more risk than before. Both versions of the code add two lists together, the other one just ran into Qt Quick type bullshit where one list got serialized to a string. In terms of what the risk of dupes is: There's one base model with a data role for "is this selected or not" and two filter models which filter this base model based on this data role, in opposite ways. The list in the add dialog is therefore guaranteed not to contain anything that's already selected. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D13101 To: hein, davidedmundson Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D13101: Fix adding langs more than once within the same session.
davidedmundson added inline comments. INLINE COMMENTS > main.qml:108 > > addLanguagesSheet.selectedLanguages.sort().forEach(function(index) { > > langs.push(availableLanguagesModel.get(index).LanguageCode); > }); Is there now a risk of adding duplicates in kcm.translationsModel.selectedLanguages? Is this a problem? REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D13101 To: hein, davidedmundson Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D13101: Fix adding langs more than once within the same session.
hein created this revision. hein added a reviewer: davidedmundson. Restricted Application added a project: Plasma. hein requested review of this revision. REVISION SUMMARY BUG:394455 REPOSITORY R119 Plasma Desktop BRANCH Plasma/5.13 REVISION DETAIL https://phabricator.kde.org/D13101 AFFECTED FILES kcms/translations/package/contents/ui/main.qml To: hein, davidedmundson Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart