summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-02 12:57:56 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-15 14:38:23 +0200
commit48794f5057f49373a7b8803db8bab7131e04575c (patch)
treea65a490bf0f55ec9b67f8ad74ba92dfa25a7eae2 /examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
parent52d91508fd391c6dd1eb0312902cd50759eedad2 (diff)
Port example over to QRegularExpression
Change-Id: I1e15bfa0a2973aabcad78f3eba4bb4903f8f3f6f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp')
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
index fd17876f2b..da31f8e361 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
+++ b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
@@ -83,8 +83,8 @@ bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow,
QModelIndex index1 = sourceModel()->index(sourceRow, 1, sourceParent);
QModelIndex index2 = sourceModel()->index(sourceRow, 2, sourceParent);
- return (sourceModel()->data(index0).toString().contains(filterRegExp())
- || sourceModel()->data(index1).toString().contains(filterRegExp()))
+ return (sourceModel()->data(index0).toString().contains(filterRegularExpression())
+ || sourceModel()->data(index1).toString().contains(filterRegularExpression()))
&& dateInRange(sourceModel()->data(index2).toDate());
}
//! [3]