summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-10-28 20:32:21 +0300
committerOrgad Shaneh <orgads@gmail.com>2017-10-30 19:38:57 +0000
commit92c1659df289ab545a2a9a5180d5abce45e867e7 (patch)
treefcde459d6b7543fe183ac90bed218bdbfc5624f3 /src
parent4c62cbd6dcc10a992e68e3bfa9988e23ba4970ee (diff)
downloadqt-creator-92c1659df289ab545a2a9a5180d5abce45e867e7.tar.gz
CamelHump: Prefer plain match over camel hump
For example: Matching "lit" against "LiteralTable" should highlight "Lit" and not "Li" and "T" from Table. Change-Id: I8a0a9d0b0b90403745e85b1d3d20deaa551416eb Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/camelhumpmatcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/camelhumpmatcher.cpp b/src/libs/utils/camelhumpmatcher.cpp
index b82cd2d899..2c81f197d7 100644
--- a/src/libs/utils/camelhumpmatcher.cpp
+++ b/src/libs/utils/camelhumpmatcher.cpp
@@ -118,9 +118,9 @@ QRegularExpression CamelHumpMatcher::createCamelHumpRegExp(
first = false;
}
- keyRegExp += ")|(" + plainRegExp + ')';
+ keyRegExp += ')';
- return QRegularExpression(keyRegExp);
+ return QRegularExpression('(' + plainRegExp + ")|" + keyRegExp);
}
/*!