Skip to content
Snippets Groups Projects
Verified Commit ab5f176d authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Use case folding instead of lower case for search

parent 777bf9f9
No related branches found
No related tags found
No related merge requests found
......@@ -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<ElementRank::first>(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<ElementRank::first>(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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment