From 2c6d7519a032db6be79120d2d16aa68c44303e86 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 7 Jan 2016 14:27:52 +0200 Subject: [PATCH] Locator: Simplify list filtering Change-Id: I06556a6ea2151074796d462096e1c9e70e348397 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/locator/locatorwidget.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index b4fd73d1907..02ac98f2ef6 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -485,11 +486,7 @@ QList LocatorWidget::filtersFor(const QString &text, QString & return prefixFilters; } searchText = text.trimmed(); - QList activeFilters; - foreach (ILocatorFilter *filter, filters) - if (filter->isIncludedByDefault()) - activeFilters << filter; - return activeFilters; + return Utils::filtered(filters, &ILocatorFilter::isIncludedByDefault); } void LocatorWidget::setProgressIndicatorVisible(bool visible)