diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2017-12-29 09:11:27 +0100 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2017-12-30 18:58:25 +0000 |
commit | b2aa1b98459fb0eb6be4cc96d9614901371cb33e (patch) | |
tree | e79bf34dcdb905bf36da7691e26e352434af856b /src/plugins/coreplugin/locator/basefilefilter.cpp | |
parent | ccc0bebcf4323ac4982e1d9b5f1407c0bb0eebf7 (diff) |
Locator: Cleanup and modernize Locator and filters
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
(and fixed the cases with non-const Qt container)
* Sort includes to common style
Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins/coreplugin/locator/basefilefilter.cpp')
-rw-r--r-- | src/plugins/coreplugin/locator/basefilefilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/locator/basefilefilter.cpp b/src/plugins/coreplugin/locator/basefilefilter.cpp index 31b23a916f..d157f88ceb 100644 --- a/src/plugins/coreplugin/locator/basefilefilter.cpp +++ b/src/plugins/coreplugin/locator/basefilefilter.cpp @@ -105,7 +105,7 @@ QList<LocatorFilterEntry> BaseFileFilter::matchesFor(QFutureInterface<LocatorFil d->m_current.clear(); // free memory return betterEntries; } - const QChar pathSeparator(QLatin1Char('/')); + const QChar pathSeparator('/'); const bool hasPathSeparator = fp.filePath.contains(pathSeparator); const bool containsPreviousEntry = !d->m_current.previousEntry.isEmpty() && fp.filePath.contains(d->m_current.previousEntry); @@ -212,7 +212,7 @@ void BaseFileFilter::updatePreviousResultData() BaseFileFilter::ListIterator::ListIterator(const QStringList &filePaths) { m_filePaths = filePaths; - foreach (const QString &path, m_filePaths) { + for (const QString &path : filePaths) { QFileInfo fi(path); m_fileNames.append(fi.fileName()); } |