Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
02dd995d
Commit
02dd995d
authored
Nov 12, 2010
by
Christian Kamm
Browse files
QmlJS: Don't autoinsert ' in string literals.
Task-number: QTCREATORBUG-2155 Reviewed-by: Roberto Raggi
parent
efb3d22c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmljseditor/qmljsautocompleter.cpp
View file @
02dd995d
...
...
@@ -183,6 +183,10 @@ bool AutoCompleter::doContextAllowsAutoParentheses(const QTextCursor &cursor,
const
QStringRef
tokenText
=
blockText
.
midRef
(
token
.
offset
,
token
.
length
);
const
QChar
quote
=
tokenText
.
at
(
0
);
// never insert ' into string literals, it adds spurious ' when writing contractions
if
(
ch
==
QLatin1Char
(
'\''
))
return
false
;
if
(
ch
!=
quote
||
isCompleteStringLiteral
(
tokenText
))
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment