aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2019-07-13 19:51:52 +0200
committerAndré Hartmann <aha_1980@gmx.de>2019-07-17 13:49:59 +0000
commit5dd4bb62b138c576b7085c029d82873d8cbd2b31 (patch)
tree595a48243dd3110d87eb289e480a513623b7f54f /src
parent3213e12ce7411efd05a544645aaa1ecd74e533a2 (diff)
FuzzyMatcher: Match mixed uppercase words and humps
"htvideoele" did not match "HTMLVideoElement" before. This can easily be achieved by modifying the uppercase snake matcher and thus making the underscore between the letters optional. Fixes: QTCREATORBUG-19838 Change-Id: I821a68b20d40fb0843c12f43f47133833c75cb9b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/fuzzymatcher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/utils/fuzzymatcher.cpp b/src/libs/utils/fuzzymatcher.cpp
index 50c3fb7fba..819c723f6d 100644
--- a/src/libs/utils/fuzzymatcher.cpp
+++ b/src/libs/utils/fuzzymatcher.cpp
@@ -72,7 +72,7 @@ QRegularExpression FuzzyMatcher::createRegExp(
const QLatin1String lowercaseWordFirst("(?<=\\b|[A-Z0-9_])");
const QLatin1String uppercaseWordContinuation("[a-z0-9_]*");
const QLatin1String lowercaseWordContinuation("(?:[a-zA-Z0-9]*_)?");
- const QLatin1String upperSnakeWordContinuation("[A-Z0-9]*_");
+ const QLatin1String upperSnakeWordContinuation("[A-Z0-9]*_?");
keyRegExp += "(?:";
for (const QChar &c : pattern) {
if (!c.isLetterOrNumber()) {