aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/fuzzymatcher.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-10-30 21:48:36 +0200
committerOrgad Shaneh <orgads@gmail.com>2017-11-04 16:12:03 +0000
commit4300041d246805b207397ba6163c72db627c47d1 (patch)
tree743841d11e5807e2234419b5f88be358c9b49879 /src/libs/utils/fuzzymatcher.cpp
parent357caf3b44ead9c7a88be560b55f4725c6c0ff01 (diff)
FuzzyMatcher: Improve wildcard matching
Make it equivalent to current wildcard implementation, and replace the current one with FuzzyMatcher. Change-Id: If83a4a8dfc7c8930bd92b49972647a519886a831 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/libs/utils/fuzzymatcher.cpp')
-rw-r--r--src/libs/utils/fuzzymatcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/fuzzymatcher.cpp b/src/libs/utils/fuzzymatcher.cpp
index 7c967361c9..60b5d3aaa2 100644
--- a/src/libs/utils/fuzzymatcher.cpp
+++ b/src/libs/utils/fuzzymatcher.cpp
@@ -78,10 +78,10 @@ QRegularExpression FuzzyMatcher::createRegExp(
if (!c.isLetter()) {
if (c == question) {
keyRegExp += '.';
- plainRegExp += '.';
+ plainRegExp += ").(";
} else if (c == asterisk) {
keyRegExp += ".*";
- plainRegExp += ".*";
+ plainRegExp += ").*(";
} else {
const QString escaped = QRegularExpression::escape(c);
keyRegExp += '(' + escaped + ')';