forked from qt-creator/qt-creator
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 <tobias.hunger@qt.io>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user