Commit 73c104ac authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Emit dataChanged in setData call

Ensures the role is properly signalled to have changed.

CCBUG: 429862

(cherry picked from commit d840c5dc)
parent 5a04c0f9
......@@ -365,17 +365,22 @@ bool AbstractNotificationsModel::setData(const QModelIndex &index, const QVarian
Notification &notification = d->notifications[index.row()];
bool dirty = false;
switch (role) {
case Notifications::ReadRole:
if (value.toBool() != {
return true;
dirty = true;
return false;
if (dirty) {
Q_EMIT dataChanged(index, index, {role});
return dirty;
int AbstractNotificationsModel::rowCount(const QModelIndex &parent) const
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