Skip to content
Snippets Groups Projects
Commit 35d55954 authored by Andreas Hatziiliou's avatar Andreas Hatziiliou Committed by Andreas Hatziiliou
Browse files

searchbar: fix warnings for invalid regular expressions

Certain characters such as @ or < were being treated as invalid
regular expressions and caused warnings to be raised. Added check
for validity of expression.

GitLab: #1628

Change-Id: I8b66ebfcf029cd0568bccdcba96672d9005846a9
parent 7330a870
No related branches found
No related tags found
No related merge requests found
...@@ -143,7 +143,7 @@ ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& s ...@@ -143,7 +143,7 @@ ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& s
} }
} else { } else {
Q_FOREACH (const auto& filter, toFilter) Q_FOREACH (const auto& filter, toFilter)
if (rx.match(filter).hasMatch()) { if (rx.isValid() && rx.match(filter).hasMatch()) {
match = true; match = true;
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment