Commit 2c6d7519 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Locator: Simplify list filtering

Change-Id: I06556a6ea2151074796d462096e1c9e70e348397
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 5419b020
...@@ -40,6 +40,7 @@ ...@@ -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 & ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment