forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Orgad Shaneh
parent
357caf3b44
commit
4300041d24
@@ -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 + ')';
|
||||
|
||||
Reference in New Issue
Block a user