Locator: Simplify list filtering

Change-Id: I06556a6ea2151074796d462096e1c9e70e348397
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-01-07 14:27:52 +02:00
committed by Orgad Shaneh
parent 5419b02058
commit 2c6d7519a0

View File

@@ -40,6 +40,7 @@
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/fileiconprovider.h> #include <coreplugin/fileiconprovider.h>
#include <coreplugin/icontext.h> #include <coreplugin/icontext.h>
#include <utils/algorithm.h>
#include <utils/appmainwindow.h> #include <utils/appmainwindow.h>
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
@@ -485,11 +486,7 @@ QList<ILocatorFilter *> LocatorWidget::filtersFor(const QString &text, QString &
return prefixFilters; return prefixFilters;
} }
searchText = text.trimmed(); searchText = text.trimmed();
QList<ILocatorFilter *> activeFilters; return Utils::filtered(filters, &ILocatorFilter::isIncludedByDefault);
foreach (ILocatorFilter *filter, filters)
if (filter->isIncludedByDefault())
activeFilters << filter;
return activeFilters;
} }
void LocatorWidget::setProgressIndicatorVisible(bool visible) void LocatorWidget::setProgressIndicatorVisible(bool visible)