NotifcationPopup: workaround crash in Qt when appending empty actions array
ClosedPublic

Authored by dvratil on Mar 20 2018, 5:40 PM.

Details

Summary

Appending an empty array of actions to QQmlListModel triggers an assert
in Qt when built in debug mode, see https://codereview.qt-project.org/#/c/223985/
for details.

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
dvratil created this revision.Mar 20 2018, 5:40 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 20 2018, 5:40 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dvratil requested review of this revision.Mar 20 2018, 5:40 PM
apol added a subscriber: apol.Mar 20 2018, 6:28 PM
apol added inline comments.
applets/notifications/package/contents/ui/NotificationPopup.qml
61

Add a comment indicating what's workarounding?

dvratil updated this revision to Diff 30030.Mar 20 2018, 6:37 PM

Add comment with explanation

apol added a comment.Mar 20 2018, 6:41 PM

Add comment with explanation

sorry it was my fault not commenting enough :P
I'd put the url to the bug or to the patch so that when future us want to check if this if still applies, we can do so by just checking if the patch is in the Qt version we depend on.

dvratil updated this revision to Diff 30041.Mar 20 2018, 7:39 PM

Update explanation

davidedmundson accepted this revision.Mar 20 2018, 9:42 PM
davidedmundson added a subscriber: davidedmundson.

Thanks so much for looking into that!

I don't think in general we should do workarounds for unreleased software, given the final version won't have the bug

but copying an empty array into a model is pretty pointless, so patch makes sense.

This revision is now accepted and ready to land.Mar 20 2018, 9:42 PM
This revision was automatically updated to reflect the committed changes.