diff options
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r-- | qt-models/filtermodels.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 48a2fd9b9..cb83ce946 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -479,18 +479,14 @@ void MultiFilterSortModel::myInvalidate() void MultiFilterSortModel::addFilterModel(FilterModelBase *model) { - QAbstractItemModel *itemModel = dynamic_cast<QAbstractItemModel *>(model); - Q_ASSERT(itemModel); models.append(model); - connect(itemModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(myInvalidate())); + connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(myInvalidate())); } void MultiFilterSortModel::removeFilterModel(FilterModelBase *model) { - QAbstractItemModel *itemModel = dynamic_cast<QAbstractItemModel *>(model); - Q_ASSERT(itemModel); models.removeAll(model); - disconnect(itemModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(myInvalidate())); + disconnect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(myInvalidate())); } void MultiFilterSortModel::clearFilter() |