[notifications applet] Fix two qml warnings about assigning [undefined]
ClosedPublic

Authored by kossebau on Mar 27 2018, 10:57 AM.

Details

Summary

Fixes
[...]/NotificationDelegate.qml:51:26: Unable to assign [undefined] to int
by using the correct name of the enum value.
[...]/NotificationDelegate.qml:122:33: Unable to assign [undefined] to bool
by proper initialization of notification model data

Test Plan

No more warnings e.g. on notifications for new emails from akonadi.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Mar 27 2018, 10:57 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 27 2018, 10:57 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Mar 27 2018, 10:57 AM
broulik added inline comments.
applets/notifications/package/contents/ui/NotificationDelegate.qml
122

Can you do that in the place where it sets hasConfigureAction, I find it odd that this one needs an explicit check but the other one doesn't

kossebau added inline comments.Mar 27 2018, 11:33 AM
applets/notifications/package/contents/ui/NotificationDelegate.qml
122

Actually I have not found out where model is coming from, and why it sometimes (?) can be undefined. Who could be the local expert to shed light onto thigs?

kossebau updated this revision to Diff 30711.Mar 27 2018, 12:00 PM

fix hasConfigureAction at the right place by proper init

broulik accepted this revision.Mar 27 2018, 12:00 PM
This revision is now accepted and ready to land.Mar 27 2018, 12:00 PM
kossebau edited the summary of this revision. (Show Details)Mar 27 2018, 12:04 PM
kossebau edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.