smsapp/conversationlistmodel: Port to QRegularExpression

I can not find any code setting the regex
This commit is contained in:
Alexander Lohnau 2023-04-17 21:45:18 +02:00
parent 8558431e68
commit 7ee3feaa2e

View file

@ -50,7 +50,7 @@ bool ConversationsSortFilterProxyModel::filterAcceptsRow(int sourceRow, const QM
if (filterRole() == ConversationListModel::ConversationIdRole) {
return sourceModel()->data(index, ConversationListModel::ConversationIdRole) != INVALID_THREAD_ID;
} else {
if (sourceModel()->data(index, Qt::DisplayRole).toString().contains(filterRegExp())) {
if (sourceModel()->data(index, Qt::DisplayRole).toString().contains(filterRegularExpression())) {
return true;
}
@ -58,7 +58,7 @@ bool ConversationsSortFilterProxyModel::filterAcceptsRow(int sourceRow, const QM
const QList<ConversationAddress> addressList = sourceModel()->data(index, ConversationListModel::AddressesRole).value<QList<ConversationAddress>>();
for (const ConversationAddress &address : addressList) {
QString canonicalAddress = SmsHelper::canonicalizePhoneNumber(address.address());
if (canonicalAddress.contains(filterRegExp())) {
if (canonicalAddress.contains(filterRegularExpression())) {
return true;
}
}