forked from qt-creator/qt-creator
TextEditor: Make threshold for automatic completion configurable
Fixes: QTCREATORBUG-19920 Change-Id: Id6be79485b1fb8c2ab4cce2706816949ae5e217b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -891,7 +891,8 @@ bool QmlJSCompletionAssistProcessor::acceptsIdleEditor() const
|
||||
++startPos;
|
||||
|
||||
const QString &word = m_interface->textAt(startPos, cursorPos - startPos);
|
||||
if (word.length() > 2 && isIdentifierChar(word.at(0), true)) {
|
||||
if (word.length() >= TextEditorSettings::completionSettings().m_characterThreshold
|
||||
&& isIdentifierChar(word.at(0), true)) {
|
||||
for (int i = 1; i < word.length(); ++i) {
|
||||
if (!isIdentifierChar(word.at(i)))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user