change allowed mistakes, fix minor style issues, remove old completer function from inputbar
This commit is contained in:
parent
1f8a3ae1e8
commit
8870455f9d
8 changed files with 43 additions and 50 deletions
|
|
@ -6,8 +6,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+|-");
|
||||
|
|
@ -59,7 +62,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