Return valid string value for DescriptionRole in all models
ClosedPublic

Authored by davidedmundson on Jan 9 2017, 1:42 AM.

Details

Summary

A qml binding converting an empty QVariant to a string value will result
in a warning:
Unable to assign [undefined] to QString

Which is apparently happening to this bug reporter, but not for other
roles.

Grepping all models shows 2 code paths where this could happen.

BUG: 369783

Test Plan

Kickoff/Kicker still open
Couldn't reproduce the original bug.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Return valid string value for DescriptionRole in all models.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 9 2017, 1:42 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein accepted this revision.Jan 9 2017, 6:40 AM
hein added a reviewer: hein.
hein added a subscriber: hein.

Not a big fan of adding implement-role-to-match-type clutter, usually go with ===/!== checks in QML instead, but it's a toss up I guess.

This revision is now accepted and ready to land.Jan 9 2017, 6:40 AM
This revision was automatically updated to reflect the committed changes.