Only use filterRegularExpression for Qt6
In Qt5, setFilterFixedString does not change the filterRegularExpression property
This commit is contained in:
parent
4eddedb3dc
commit
4a4aa35ec4
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue