# # # patch "src/model/InventoryProxyModel.cpp" # from [0b7f2d44195acd246cdd292415a345a67fb1e83f] # to [27eb686f1793a8414a5f7c1b58524164232a7471] # # patch "src/model/InventoryProxyModel.h" # from [0472a2751889e3209e24b149fafc783d33459546] # to [e6fdad31888678a74a8a1400c4f8e0d77545b52f] # ============================================================ --- src/model/InventoryProxyModel.cpp 0b7f2d44195acd246cdd292415a345a67fb1e83f +++ src/model/InventoryProxyModel.cpp 27eb686f1793a8414a5f7c1b58524164232a7471 @@ -93,8 +93,7 @@ bool InventoryProxyModel::filterAcceptsR // check if we should only display folders acceptRow &= !folderTree || invitem->isDirectory(); - acceptRow &= filter.isEmpty() || - const_cast(this)->itemMatchesFilter(invitem); + acceptRow &= filter.isEmpty() || itemMatchesFilter(invitem); return acceptRow; } @@ -178,7 +177,7 @@ void InventoryProxyModel::filterItemsByN // FIXME: we're basically doing this twice for each proxy model, while // a single proxy model which does the filtering for both (sub) proxy // models should be enough. Tweak that some time. -bool InventoryProxyModel::itemMatchesFilter(const InventoryItem * item) +bool InventoryProxyModel::itemMatchesFilter(const InventoryItem * item) const { if (filter.indexIn(item->getLabel()) >= 0) { ============================================================ --- src/model/InventoryProxyModel.h 0472a2751889e3209e24b149fafc783d33459546 +++ src/model/InventoryProxyModel.h e6fdad31888678a74a8a1400c4f8e0d77545b52f @@ -44,7 +44,7 @@ private: void filterItemsByName(const QString &); private: - bool itemMatchesFilter(const InventoryItem *); + bool itemMatchesFilter(const InventoryItem *) const; bool folderTree; int sortColumn;