From f05477dc396695dafc6cce3bab9059b253485520 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 22 Jan 2020 15:07:31 +0100 Subject: [PATCH] Core: Propagate dataChanged signal If the ListModel needs to emit dataChanged signals ensure they will be handled correctly. Change-Id: I2a543737ca442819fc4d3dead15108cb3a00765d Reviewed-by: David Schulz --- src/plugins/coreplugin/welcomepagehelper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index e705d5406f6..a8eeb042b8e 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -122,6 +122,14 @@ void GridProxyModel::setSourceModel(QAbstractItemModel *newModel) beginResetModel(); }); connect(newModel, &QAbstractItemModel::rowsRemoved, this, [this] { endResetModel(); }); + connect(newModel, + &QAbstractItemModel::dataChanged, + this, + [this] (const QModelIndex &topLeft, + const QModelIndex &bottomRight, + const QVector &roles) { + QAbstractItemModel::dataChanged(mapFromSource(topLeft), mapFromSource(bottomRight), roles); + }); } }