forked from qt-creator/qt-creator
Locator: Rename variables for consistency
Change-Id: Ifc2228b4b18a8ce6ba19390f796f1f3c05e381d4 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -47,15 +47,15 @@ BaseFileFilter::BaseFileFilter()
|
||||
QList<FilterEntry> BaseFileFilter::matchesFor(QFutureInterface<Locator::FilterEntry> &future, const QString &origEntry)
|
||||
{
|
||||
updateFiles();
|
||||
QList<FilterEntry> matches;
|
||||
QList<FilterEntry> badMatches;
|
||||
QList<FilterEntry> betterEntries;
|
||||
QList<FilterEntry> goodEntries;
|
||||
QString needle = trimWildcards(origEntry);
|
||||
const QString lineNoSuffix = EditorManager::splitLineNumber(&needle);
|
||||
QStringMatcher matcher(needle, Qt::CaseInsensitive);
|
||||
const QChar asterisk = QLatin1Char('*');
|
||||
QRegExp regexp(asterisk + needle+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
|
||||
if (!regexp.isValid())
|
||||
return matches;
|
||||
return betterEntries;
|
||||
const bool hasWildcard = needle.contains(asterisk) || needle.contains(QLatin1Char('?'));
|
||||
QStringList searchListPaths;
|
||||
QStringList searchListNames;
|
||||
@@ -86,16 +86,16 @@ QList<FilterEntry> BaseFileFilter::matchesFor(QFutureInterface<Locator::FilterEn
|
||||
entry.extraInfo = FileUtils::shortNativePath(FileName(fi));
|
||||
entry.fileName = path;
|
||||
if (name.startsWith(needle, caseSensitivityForPrefix))
|
||||
matches.append(entry);
|
||||
betterEntries.append(entry);
|
||||
else
|
||||
badMatches.append(entry);
|
||||
goodEntries.append(entry);
|
||||
m_previousResultPaths.append(path);
|
||||
m_previousResultNames.append(name);
|
||||
}
|
||||
}
|
||||
|
||||
matches.append(badMatches);
|
||||
return matches;
|
||||
betterEntries.append(goodEntries);
|
||||
return betterEntries;
|
||||
}
|
||||
|
||||
void BaseFileFilter::accept(Locator::FilterEntry selection) const
|
||||
|
||||
Reference in New Issue
Block a user