From 4e59ca2bb582cba9804bc3e4fdb3470fb028f1b6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Apr 2022 08:50:53 +0200 Subject: [PATCH] Examples: Match tags case insensitively Fixes: QTCREATORBUG-27339 Change-Id: I33a5726f9e1d66dafa876ec279f3c1ca939d964c Reviewed-by: Alessandro Portale Reviewed-by: Reviewed-by: Kai Koehne --- src/plugins/coreplugin/welcomepagehelper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index ffdfc4bcde0..0bbd3fa2520 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -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;