Merge branch 'quickswitcher_qml' of git://github.com/Jedi18/nheko into Jedi18-quickswitcher_qml
This commit is contained in:
commit
7a356f3832
18 changed files with 323 additions and 272 deletions
|
|
@ -10,8 +10,11 @@
|
|||
#include "Logging.h"
|
||||
#include "Utils.h"
|
||||
|
||||
CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *parent)
|
||||
CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model,
|
||||
int max_mistakes,
|
||||
QObject *parent)
|
||||
: QAbstractProxyModel(parent)
|
||||
, maxMistakes_(max_mistakes)
|
||||
{
|
||||
setSourceModel(model);
|
||||
QRegularExpression splitPoints("\\s+|-");
|
||||
|
|
@ -63,7 +66,7 @@ CompletionProxyModel::invalidate()
|
|||
{
|
||||
auto key = searchString.toUcs4();
|
||||
beginResetModel();
|
||||
mapping = trie_.search(key, 7);
|
||||
mapping = trie_.search(key, 7, maxMistakes_);
|
||||
endResetModel();
|
||||
|
||||
std::string temp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue