diff --git a/Modules/QtWidgets/QmitkDataStorageFilterProxyModel.cpp b/Modules/QtWidgets/QmitkDataStorageFilterProxyModel.cpp index 2f2e387023..eb7ddefe06 100644 --- a/Modules/QtWidgets/QmitkDataStorageFilterProxyModel.cpp +++ b/Modules/QtWidgets/QmitkDataStorageFilterProxyModel.cpp @@ -1,85 +1,85 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include #include #include #include #include #include #include #include #include #include #include "QmitkDataStorageFilterProxyModel.h" #include "QmitkDataStorageTreeModel.h" #include "QmitkNodeDescriptorManager.h" #include #include #include #include #include #include QmitkDataStorageFilterProxyModel::QmitkDataStorageFilterProxyModel(QObject* parent) : QSortFilterProxyModel(parent) { } QmitkDataStorageFilterProxyModel::~QmitkDataStorageFilterProxyModel() { } void QmitkDataStorageFilterProxyModel::AddFilterPredicate(mitk::NodePredicateBase::Pointer pred) { m_Predicates.insert(pred); this->invalidateFilter(); } bool QmitkDataStorageFilterProxyModel::RemoveFilterPredicate(mitk::NodePredicateBase::Pointer pred) { bool removed = m_Predicates.erase(pred) != 0; if (removed) { this->invalidateFilter(); } return removed; } bool QmitkDataStorageFilterProxyModel::HasFilterPredicate(mitk::NodePredicateBase::Pointer pred) { return m_Predicates.find(pred) != m_Predicates.end(); } bool QmitkDataStorageFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { QmitkDataStorageTreeModel* model = dynamic_cast(this->sourceModel()); assert(model); QModelIndex index0 = sourceModel()->index(sourceRow, 0, sourceParent); - for (FilterPredicatesCollection::iterator iter = m_Predicates.begin(); iter != m_Predicates.end(); ++iter) { + for (FilterPredicatesCollection::const_iterator iter = m_Predicates.begin(); iter != m_Predicates.end(); ++iter) { if ((*iter)->CheckNode(model->GetNode(index0))) { return false; } } return true; }