Commit 285f054d authored by Eike Ziller's avatar Eike Ziller

Locator: Don't ask disabled filters for results

If they are disabled, behave is if they didn't exist (when looking for
matches). This was no issue with our own filters so far, because these
(by accident) also don't have anything to return if they are disabled.

Change-Id: Ia5fe85039631c41f7488d78d9f54b6322dc72b32
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent be4cfb5f
......@@ -746,7 +746,8 @@ QList<ILocatorFilter *> LocatorWidget::filtersFor(const QString &text, QString &
break;
}
const int whiteSpace = text.indexOf(QChar::Space, firstNonSpace);
const QList<ILocatorFilter *> filters = Locator::filters();
const QList<ILocatorFilter *> filters = Utils::filtered(Locator::filters(),
&ILocatorFilter::isEnabled);
if (whiteSpace >= 0) {
const QString prefix = text.mid(firstNonSpace, whiteSpace - firstNonSpace).toLower();
QList<ILocatorFilter *> prefixFilters;
......
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