Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frame/models/kextracolumnsproxymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ KExtraColumnsProxyModel::KExtraColumnsProxyModel(QObject *parent)
: QIdentityProxyModel(parent)
, d_ptr(new KExtraColumnsProxyModelPrivate(this))
{
// The handling of persistent model indexes assumes mapToSource can be called for any index
// This breaks for the extra column, so we'll have to do it ourselves
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
setHandleSourceLayoutChanges(false);
#endif
}

KExtraColumnsProxyModel::~KExtraColumnsProxyModel()
Expand Down Expand Up @@ -96,6 +101,7 @@ void KExtraColumnsProxyModel::setSourceModel(QAbstractItemModel *model)
if (model) {
// The handling of persistent model indexes assumes mapToSource can be called for any index
// This breaks for the extra column, so we'll have to do it ourselves
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
disconnect(model,
SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
this,
Expand All @@ -104,6 +110,7 @@ void KExtraColumnsProxyModel::setSourceModel(QAbstractItemModel *model)
SIGNAL(layoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
this,
SLOT(_q_sourceLayoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
#endif
connect(model,
SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
this,
Expand Down
Loading