Commit 02dd995d authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Don't autoinsert ' in string literals.

Task-number: QTCREATORBUG-2155
Reviewed-by: Roberto Raggi
parent efb3d22c
......@@ -183,6 +183,10 @@ bool AutoCompleter::doContextAllowsAutoParentheses(const QTextCursor &cursor,
const QStringRef tokenText = blockText.midRef(token.offset, token.length);
const QChar quote =;
// never insert ' into string literals, it adds spurious ' when writing contractions
if (ch == QLatin1Char('\''))
return false;
if (ch != quote || isCompleteStringLiteral(tokenText))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment