| Summary: | contents/ui/KickoffItem.qml:218:19: Unable to assign [undefined] to QString | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Elias Probst <mail> |
| Component: | Application Launcher (Kickoff) widget | Assignee: | David Edmundson <kde> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | plasma-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | 1.0 | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/plasma-desktop/4b46112a59cbd3046f0682ef7dba3e12bfb13197 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
Git commit 4b46112a59cbd3046f0682ef7dba3e12bfb13197 by David Edmundson. Committed on 09/01/2017 at 14:00. Pushed by davidedmundson into branch 'master'. Return valid string value for DescriptionRole in all models 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. Test Plan: Kickoff/Kicker still open Couldn't reproduce the original bug. Reviewers: #plasma, hein Reviewed By: #plasma, hein Subscribers: hein, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4033 M +2 -0 applets/kicker/plugin/computermodel.cpp M +2 -0 applets/kicker/plugin/recentcontactsmodel.cpp https://commits.kde.org/plasma-desktop/4b46112a59cbd3046f0682ef7dba3e12bfb13197 |
plasmashell logs a few hundreds of this line every now and then: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/KickoffItem.qml:218:19: Unable to assign [undefined] to QString I can reproduce this by launching Thunderbird 45.4.0 from my Kickoff favorites, but I think I've seen it in a few other cases (I couldn't clearly reproduce yet) too. Although this could be easily fixed by this: --- a/applets/kickoff/package/contents/ui/KickoffItem.qml +++ b/applets/kickoff/package/contents/ui/KickoffItem.qml @@ -215,7 +215,7 @@ Item { } height: paintedHeight - text: model.description + text: model.description || "" opacity: isCurrent ? 0.6 : 0.3 font.pointSize: theme.smallestFont.pointSize elide: Text.ElideMiddle …I feel like the root cause is actually within the model where the description isn't handled correctly (but to fix that is beyond my knowledge).