From 856119c5a43b4781b051b93a0713c152cfd99f85 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 15 Apr 2022 13:27:34 +0200 Subject: 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... --- mappingtreeproxy.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mappingtreeproxy.cpp') 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); -- cgit v1.2.3-70-g09d2