mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38: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,7 +22,8 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
.toLower();
|
||||
trie_.insert(string1.toUcs4(), i);
|
||||
|
||||
for (const auto &e : string1.split(splitPoints, Qt::SkipEmptyParts)) {
|
||||
for (const auto &e : string1.split(splitPoints)) {
|
||||
if (!e.isEmpty()) // NOTE(Nico): Use Qt::SkipEmptyParts in Qt 5.14
|
||||
trie_.insert(e.toUcs4(), i);
|
||||
}
|
||||
|
||||
|
@ -33,7 +34,8 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
|
||||
if (!string2.isEmpty()) {
|
||||
trie_.insert(string2.toUcs4(), i);
|
||||
for (const auto &e : string2.split(splitPoints, Qt::SkipEmptyParts)) {
|
||||
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