diff --git a/src/Editor/ResourceBrowser/CResourceProxyModel.cpp b/src/Editor/ResourceBrowser/CResourceProxyModel.cpp index 798608e9..b22d7fce 100644 --- a/src/Editor/ResourceBrowser/CResourceProxyModel.cpp +++ b/src/Editor/ResourceBrowser/CResourceProxyModel.cpp @@ -103,7 +103,7 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS return true; } -void CResourceProxyModel::SetTypeFilter(CResTypeInfo *pInfo, bool Allow) +void CResourceProxyModel::SetTypeFilter(const CResTypeInfo *pInfo, bool Allow) { if (Allow) mTypeFilter.insert(pInfo); @@ -111,7 +111,7 @@ void CResourceProxyModel::SetTypeFilter(CResTypeInfo *pInfo, bool Allow) mTypeFilter.remove(pInfo); } -bool CResourceProxyModel::IsTypeAccepted(CResTypeInfo* pTypeInfo) const +bool CResourceProxyModel::IsTypeAccepted(const CResTypeInfo* pTypeInfo) const { return mTypeFilter.isEmpty() || mTypeFilter.contains(pTypeInfo); } diff --git a/src/Editor/ResourceBrowser/CResourceProxyModel.h b/src/Editor/ResourceBrowser/CResourceProxyModel.h index 9da9e23b..d1626149 100644 --- a/src/Editor/ResourceBrowser/CResourceProxyModel.h +++ b/src/Editor/ResourceBrowser/CResourceProxyModel.h @@ -25,10 +25,10 @@ public: bool lessThan(const QModelIndex& rkLeft, const QModelIndex& rkRight) const override; bool filterAcceptsRow(int SourceRow, const QModelIndex& rkSourceParent) const override; - void SetTypeFilter(CResTypeInfo *pInfo, bool Allow); + void SetTypeFilter(const CResTypeInfo *pInfo, bool Allow); void ClearTypeFilter() { mTypeFilter.clear(); } bool HasTypeFilter() const { return !mTypeFilter.isEmpty(); } - bool IsTypeAccepted(CResTypeInfo* pTypeInfo) const; + bool IsTypeAccepted(const CResTypeInfo* pTypeInfo) const; void SetSortMode(ESortMode Mode); @@ -39,7 +39,7 @@ private: CResourceTableModel *mpModel = nullptr; TString mSearchString; ESortMode mSortMode{}; - QSet mTypeFilter; + QSet mTypeFilter; uint64_t mCompareID = 0; uint64_t mCompareMask = 0;