Don't overwrite status
AbandonedPublic

Authored by davidre on Mar 17 2020, 10:42 AM.

Details

Reviewers
broulik
kmaterka
davidedmundson
Group Reviewers
Plasma
Summary

The qml checks the value against the enum but updateItemData inserts the string.

Test Plan

set an attentionIconByName in kstatusnotifieritemtest

Diff Detail

Repository
R120 Plasma Workspace
Branch
attention (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23807
Build 23825: arc lint + arc unit
davidre created this revision.Mar 17 2020, 10:42 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 17 2020, 10:42 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidre requested review of this revision.Mar 17 2020, 10:42 AM
davidre edited the summary of this revision. (Show Details)Mar 17 2020, 10:48 AM
davidedmundson accepted this revision.Mar 17 2020, 10:59 AM
This revision is now accepted and ready to land.Mar 17 2020, 10:59 AM
kmaterka requested changes to this revision.Mar 17 2020, 9:54 PM

The qml checks the value against the enum but updateItemData inserts the string.

These are two different roles:
"status" with enum value
"Status" from SNI data

The same happens for "category" role.

And yeah, I know this is confusing... The best would be to remove all unused roles, especially all *Changed. I just copied all from StatusNotifierItemSource, some of them are deprecated from Plasma 4 times.

This revision now requires changes to proceed.Mar 17 2020, 9:54 PM
davidre abandoned this revision.Mar 17 2020, 10:02 PM

The qml checks the value against the enum but updateItemData inserts the string.

These are two different roles:
"status" with enum value
"Status" from SNI data

The same happens for "category" role.

And yeah, I know this is confusing... The best would be to remove all unused roles, especially all *Changed. I just copied all from StatusNotifierItemSource, some of them are deprecated from Plasma 4 times.

Oh you're right. It was not wokring for me on 5.18 so I changed this and it worked. But matter of fact it worked on master all allong :)

Oh you're right. It was not wokring for me on 5.18 so I changed this and it worked. But matter of fact it worked on master all allong :)

5.18 is not using this data model, in 5.18 it is used only in configuration page. In 5.19 this model is everywhere.