summaryrefslogtreecommitdiffstats
path: root/mappingtreeproxy.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2022-04-15 13:27:34 +0200
committerArno <arno@disconnect.de>2022-04-15 13:27:34 +0200
commit856119c5a43b4781b051b93a0713c152cfd99f85 (patch)
tree4e2fde4e7a76179cc243e0665091c6ad429ea640 /mappingtreeproxy.cpp
parent62d3ca1482b202d2883eeb5e17e72300e8612477 (diff)
downloadSheMov-856119c5a43b4781b051b93a0713c152cfd99f85.tar.gz
SheMov-856119c5a43b4781b051b93a0713c152cfd99f85.tar.bz2
SheMov-856119c5a43b4781b051b93a0713c152cfd99f85.zip
Make it run with Qt6
This is a huge commit. Changes: * Obviously, make it compile * Make it run (only scarcely tested) * get rid of most of clang's warnings Let's see what surprises are in store...
Diffstat (limited to 'mappingtreeproxy.cpp')
-rw-r--r--mappingtreeproxy.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/mappingtreeproxy.cpp b/mappingtreeproxy.cpp
index 077d72a..6758f55 100644
--- a/mappingtreeproxy.cpp
+++ b/mappingtreeproxy.cpp
@@ -11,12 +11,16 @@
MappingTreeProxy::MappingTreeProxy(QObject *parent) : QSortFilterProxyModel(parent) {}
void MappingTreeProxy::setFilter(const QString &filter){
- mFilter = QRegExp(filter);
+ if(!filter.isEmpty()){
+ mFilter = QRegularExpression(filter);
+ }else{
+ mFilter = QRegularExpression();
+ }
invalidateFilter();
}
bool MappingTreeProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const{
- if(mFilter.isEmpty()){
+ if(mFilter == QRegularExpression()){
return true;
}
QModelIndex nameIdx = sourceModel()->index(sourceRow, MappingTreeModel::Name, sourceParent);