test: migrate QItemSelectionModel test to QRegularExpression

This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: Ibbd161700bf9e75736652b99dfa1ffd47e584249
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Samuel Gaist 2019-06-10 08:45:33 +02:00
parent 0389a459bb
commit 826b262fa6

View File

@ -2264,7 +2264,7 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected1()
QCOMPARE(model.rowCount(), 3);
QCOMPARE(proxy.rowCount(), 3);
proxy.setFilterRegExp( QRegExp("f"));
proxy.setFilterRegularExpression(QRegularExpression("f"));
QCOMPARE(proxy.rowCount(), 2);
QList<QPersistentModelIndex> indexList;
@ -2276,7 +2276,7 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected1()
foreach(QPersistentModelIndex index, indexList)
QVERIFY(selection.isSelected(index));
proxy.setFilterRegExp(QRegExp());
proxy.setFilterRegularExpression(QRegularExpression());
QCOMPARE(proxy.rowCount(), 3);
//let's check the selection hasn't changed