From 48794f5057f49373a7b8803db8bab7131e04575c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 2 Apr 2020 12:57:56 +0200 Subject: Port example over to QRegularExpression Change-Id: I1e15bfa0a2973aabcad78f3eba4bb4903f8f3f6f Reviewed-by: Alex Blasche --- .../itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp') 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] -- cgit v1.2.3