forked from qt-creator/qt-creator
Examples: Match tags case insensitively
Fixes: QTCREATORBUG-27339 Change-Id: I33a5726f9e1d66dafa876ec279f3c1ca939d964c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
@@ -204,7 +204,7 @@ bool ListModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP
|
||||
|
||||
if (!m_filterTags.isEmpty()) {
|
||||
return Utils::allOf(m_filterTags, [&item](const QString &filterTag) {
|
||||
return item->tags.contains(filterTag);
|
||||
return item->tags.contains(filterTag, Qt::CaseInsensitive);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -214,7 +214,9 @@ bool ListModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP
|
||||
wordMatch |= bool(item->name.contains(subString, Qt::CaseInsensitive));
|
||||
if (wordMatch)
|
||||
continue;
|
||||
const auto subMatch = [&subString](const QString &elem) { return elem.contains(subString); };
|
||||
const auto subMatch = [&subString](const QString &elem) {
|
||||
return elem.contains(subString, Qt::CaseInsensitive);
|
||||
};
|
||||
wordMatch |= Utils::contains(item->tags, subMatch);
|
||||
if (wordMatch)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user