mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
SkipEmptyParts was only added in Qt 5.14
This commit is contained in:
parent
202e3debe6
commit
b2387df411
1 changed files with 6 additions and 4 deletions
|
@ -22,8 +22,9 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
.toLower();
|
||||
trie_.insert(string1.toUcs4(), i);
|
||||
|
||||
for (const auto &e : string1.split(splitPoints, Qt::SkipEmptyParts)) {
|
||||
trie_.insert(e.toUcs4(), i);
|
||||
for (const auto &e : string1.split(splitPoints)) {
|
||||
if (!e.isEmpty()) // NOTE(Nico): Use Qt::SkipEmptyParts in Qt 5.14
|
||||
trie_.insert(e.toUcs4(), i);
|
||||
}
|
||||
|
||||
auto string2 = sourceModel()
|
||||
|
@ -33,8 +34,9 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
|
||||
if (!string2.isEmpty()) {
|
||||
trie_.insert(string2.toUcs4(), i);
|
||||
for (const auto &e : string2.split(splitPoints, Qt::SkipEmptyParts)) {
|
||||
trie_.insert(e.toUcs4(), i);
|
||||
for (const auto &e : string2.split(splitPoints)) {
|
||||
if (!e.isEmpty()) // NOTE(Nico): Use Qt::SkipEmptyParts in Qt 5.14
|
||||
trie_.insert(e.toUcs4(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue