From 5adf60790608178cc97b5277a9169d6461daafa6 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 19 May 2023 22:06:04 +0200 Subject: [PATCH] Use case folding instead of lower case for search --- src/CompletionProxyModel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CompletionProxyModel.cpp b/src/CompletionProxyModel.cpp index e21f800d..638b5fb4 100644 --- a/src/CompletionProxyModel.cpp +++ b/src/CompletionProxyModel.cpp @@ -45,7 +45,7 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, auto string1 = sourceModel() ->data(sourceModel()->index(i, 0), CompletionModel::SearchRole) .toString() - .toLower(); + .toCaseFolded(); if (!string1.isEmpty()) { trie_.insert(string1.toUcs4(), i); insertParts(string1, i); @@ -54,7 +54,7 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, auto string2 = sourceModel() ->data(sourceModel()->index(i, 0), CompletionModel::SearchRole2) .toString() - .toLower(); + .toCaseFolded(); if (!string2.isEmpty()) { trie_.insert(string2.toUcs4(), i); insertParts(string2, i); @@ -74,7 +74,7 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, &CompletionProxyModel::newSearchString, this, [this](const QString &s) { - searchString_ = s.toLower(); + searchString_ = s.toCaseFolded(); invalidate(); }, Qt::QueuedConnection);