forked from qt-creator/qt-creator
QmlEditor: Prevent to collect next char twice in completer.
Change-Id: Ibcd7ff84212da3f9ae65b37eadc73eed82f1e32b Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -226,7 +226,7 @@ bool AutoCompleter::isInComment(const QTextCursor &cursor) const
|
|||||||
|
|
||||||
QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,
|
QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,
|
||||||
const QString &text,
|
const QString &text,
|
||||||
QChar,
|
QChar la,
|
||||||
int *skippedChars) const
|
int *skippedChars) const
|
||||||
{
|
{
|
||||||
if (text.length() != 1)
|
if (text.length() != 1)
|
||||||
@@ -235,8 +235,6 @@ QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,
|
|||||||
if (! shouldInsertMatchingText(cursor))
|
if (! shouldInsertMatchingText(cursor))
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
const QChar la = cursor.document()->characterAt(cursor.position());
|
|
||||||
|
|
||||||
const QChar ch = text.at(0);
|
const QChar ch = text.at(0);
|
||||||
switch (ch.unicode()) {
|
switch (ch.unicode()) {
|
||||||
case '\'':
|
case '\'':
|
||||||
|
|||||||
Reference in New Issue
Block a user