diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-10-30 21:42:18 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-11-02 09:26:17 +0000 |
commit | bacfc28a36eb858b65e9786061f68f145d4fd5f6 (patch) | |
tree | 187047add90c077b8bc7131e6e0abf9c23739288 /src/plugins/cpptools/cpplocatorfilter.cpp | |
parent | 2d5d62fdbc41be6535655f0add2cf4eb1cd35986 (diff) |
CppTools: Match also function arguments in locator
Useful when there are several overloads for the same function.
Change-Id: I325bda7d2fdf4108f71a61d5473cd55310c51c28
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpplocatorfilter.cpp')
-rw-r--r-- | src/plugins/cpptools/cpplocatorfilter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpplocatorfilter.cpp b/src/plugins/cpptools/cpplocatorfilter.cpp index 977c6188554..ba31251bf37 100644 --- a/src/plugins/cpptools/cpplocatorfilter.cpp +++ b/src/plugins/cpptools/cpplocatorfilter.cpp @@ -83,8 +83,11 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor( m_data->filterAllFiles([&](const IndexItem::Ptr &info) -> IndexItem::VisitorResult { if (future.isCanceled()) return IndexItem::Break; - if (info->type() & wanted) { + const IndexItem::ItemType type = info->type(); + if (type & wanted) { QString matchString = hasColonColon ? info->scopedSymbolName() : info->symbolName(); + if (type == IndexItem::Function) + matchString += info->symbolType(); QRegularExpressionMatch match = regexp.match(matchString); if (match.hasMatch()) { Core::LocatorFilterEntry filterEntry = filterEntryFromIndexItem(info); |