Ref T171, move completer utility function in own class

This commit is contained in:
Klaus Basan
2017-10-16 12:54:59 +02:00
parent d348226283
commit 73c76155f7
2 changed files with 22 additions and 0 deletions

View File

@@ -39,4 +39,13 @@ namespace BlackGui
{
return (QDateTime::currentMSecsSinceEpoch() - m_lastUpdated) <= checkTimeMs;
}
void CompleterUtils::setCompleterParameters(QCompleter *completer)
{
Q_ASSERT_X(completer, Q_FUNC_INFO, "Need completer");
completer->setCaseSensitivity(Qt::CaseInsensitive);
completer->setWrapAround(true);
completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
completer->setCompletionMode(QCompleter::InlineCompletion);
}
} // ns