Only use filterRegularExpression for Qt6

In Qt5, setFilterFixedString does not change the filterRegularExpression property
This commit is contained in:
Alexander Lohnau 2023-05-29 17:16:58 +02:00
parent 4eddedb3dc
commit 4a4aa35ec4

View file

@ -58,7 +58,11 @@ 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 QT_VERSION_MAJOR < 6
if (canonicalAddress.contains(filterRegExp())) {
#else
if (canonicalAddress.contains(filterRegularExpression())) {
#endif
return true;
}
}