D17218: Fix removing first item in languages list

David Edmundson noreply at phabricator.kde.org
Wed Jan 2 08:21:01 GMT 2019


davidedmundson accepted this revision.
davidedmundson added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> translationsmodel.cpp:216
>  
> -    if (index < 1) {
> +    if (m_selectedLanguages.count() < 2) {
>          return;

Changing from index < 1 to checking count makes sense, but I would still check

if (index < 0) {return;}

in addition to the count to catch out-of-sync erorrs. I think then you wouldn't need to complicate the QML side.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  master

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

To: hein, #plasma, davidedmundson, broulik
Cc: plasma-devel, GB_2, 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/20190102/6a23537b/attachment.html>


More information about the Plasma-devel mailing list