forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5'
Conflicts: src/plugins/debugger/debuggerruncontrol.cpp src/plugins/projectexplorer/gcctoolchain.cpp Change-Id: Iaad0659293681cce4266fc3e4ba2a4f2068de911
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <utils/camelhumpmatcher.h>
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
@@ -67,9 +66,7 @@ QList<Core::LocatorFilterEntry> CppCurrentDocumentFilter::matchesFor(
|
||||
QList<Core::LocatorFilterEntry> goodEntries;
|
||||
QList<Core::LocatorFilterEntry> betterEntries;
|
||||
|
||||
const QRegularExpression regexp = containsWildcard(entry)
|
||||
? createWildcardRegExp(entry) : CamelHumpMatcher::createCamelHumpRegExp(entry);
|
||||
|
||||
const QRegularExpression regexp = createRegExp(entry);
|
||||
if (!regexp.isValid())
|
||||
return goodEntries;
|
||||
|
||||
@@ -98,14 +95,13 @@ QList<Core::LocatorFilterEntry> CppCurrentDocumentFilter::matchesFor(
|
||||
|
||||
Core::LocatorFilterEntry filterEntry(this, name, id, info->icon());
|
||||
filterEntry.extraInfo = extraInfo;
|
||||
if (!match.hasMatch()) {
|
||||
if (match.hasMatch()) {
|
||||
filterEntry.highlightInfo = highlightInfo(match);
|
||||
} else {
|
||||
match = regexp.match(extraInfo);
|
||||
filterEntry.highlightInfo.dataType = Core::LocatorFilterEntry::HighlightInfo::ExtraInfo;
|
||||
filterEntry.highlightInfo =
|
||||
highlightInfo(match, Core::LocatorFilterEntry::HighlightInfo::ExtraInfo);
|
||||
}
|
||||
const CamelHumpMatcher::HighlightingPositions positions =
|
||||
CamelHumpMatcher::highlightingPositions(match);
|
||||
filterEntry.highlightInfo.starts = positions.starts;
|
||||
filterEntry.highlightInfo.lengths = positions.lengths;
|
||||
|
||||
if (betterMatch)
|
||||
betterEntries.append(filterEntry);
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/camelhumpmatcher.h>
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
@@ -76,9 +75,8 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor(
|
||||
const Qt::CaseSensitivity caseSensitivityForPrefix = caseSensitivity(entry);
|
||||
bool hasColonColon = entry.contains(QLatin1String("::"));
|
||||
const IndexItem::ItemType wanted = matchTypes();
|
||||
const QRegularExpression regexp = containsWildcard(entry)
|
||||
? createWildcardRegExp(entry) : CamelHumpMatcher::createCamelHumpRegExp(entry);
|
||||
|
||||
const QRegularExpression regexp = createRegExp(entry);
|
||||
if (!regexp.isValid())
|
||||
return goodEntries;
|
||||
|
||||
@@ -95,10 +93,7 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor(
|
||||
// to update the match if the displayName is different from matchString
|
||||
if (matchString != filterEntry.displayName)
|
||||
match = regexp.match(filterEntry.displayName);
|
||||
const CamelHumpMatcher::HighlightingPositions positions =
|
||||
CamelHumpMatcher::highlightingPositions(match);
|
||||
filterEntry.highlightInfo.starts = positions.starts;
|
||||
filterEntry.highlightInfo.lengths = positions.lengths;
|
||||
filterEntry.highlightInfo = highlightInfo(match);
|
||||
|
||||
if (matchString.startsWith(entry, caseSensitivityForPrefix))
|
||||
bestEntries.append(filterEntry);
|
||||
|
||||
Reference in New Issue
Block a user