forked from qt-creator/qt-creator
QmlJsEditor: unify behavior of autocompletion to C++ editor.
Changed behavior of autocompletion for uniformity with C++ completion. E.g: changing 'x' to 'c' in "Rextangle" used to trigger completion, resulting in: "Rectangletangle". Task-number: QTCREATORBUG-15379 Change-Id: I0597a8d76843b8f1c20c39877267aa70a6b0e1a2 Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -858,6 +858,8 @@ bool QmlJSCompletionAssistProcessor::acceptsIdleEditor() const
|
||||
maybeAccept = true;
|
||||
} else {
|
||||
const QChar &charUnderCursor = m_interface->textDocument()->characterAt(cursorPos);
|
||||
if (isValidIdentifierChar(charUnderCursor))
|
||||
return false;
|
||||
if (isIdentifierChar(charBeforeCursor)
|
||||
&& ((charUnderCursor.isSpace()
|
||||
|| charUnderCursor.isNull()
|
||||
|
||||
Reference in New Issue
Block a user