Commit 27854ca9 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

NotifcationPopup: workaround crash in Qt when appending empty actions array

Appending an empty array of actions to QQmlListModel triggers an assert
in Qt when built in debug mode, see
for details.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: davidedmundson, apol, plasma-devel

Tags: #plasma

Differential Revision:
parent e37156b4
......@@ -57,8 +57,11 @@ PlasmaCore.Dialog {
//temporarly disable height binding, avoids an useless window resize when removing the old actions
heightBinding.when = false;
// notification.actions is a JS array, but we can easily append that to our model
// Workaround a crash in Qt when appending an empty list (
if (notificationProperties.actions.length > 0) {
//enable height binding again, finally do the resize
heightBinding.when = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment