diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 65ddfe75489..16fc3565454 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -1058,7 +1058,7 @@ bool QmlJSTextEditor::contextAllowsAutoParentheses(const QTextCursor &cursor, co const QStringRef tokenText = blockText.midRef(token.offset, token.length); const QChar quote = tokenText.at(0); - if (ch == quote && isCompleteStringLiteral(tokenText)) + if (ch != quote || isCompleteStringLiteral(tokenText)) break; return false;