From 4d7444e6cd866b1c10099cbc9788fc0bc8e5cc4c Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Wed, 10 Feb 2010 16:23:33 +0100
Subject: [PATCH] Fixed the insertion of matching braces when the token at the
 left of the cursor is a string literal.

---
 src/plugins/qmljseditor/qmljseditor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
GitLab