summaryrefslogtreecommitdiff
path: root/src/plugins/glsleditor/glslautocompleter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/glsleditor/glslautocompleter.cpp')
-rw-r--r--src/plugins/glsleditor/glslautocompleter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/glsleditor/glslautocompleter.cpp b/src/plugins/glsleditor/glslautocompleter.cpp
index 9df6140688..e64040a28a 100644
--- a/src/plugins/glsleditor/glslautocompleter.cpp
+++ b/src/plugins/glsleditor/glslautocompleter.cpp
@@ -74,7 +74,7 @@ bool GLSLCompleter::contextAllowsElectricCharacters(const QTextCursor &cursor) c
if (tk.isComment()) {
const unsigned pos = cursor.selectionEnd() - cursor.block().position();
- if (pos == tk.bytesEnd()) {
+ if (pos == tk.utf16charsEnd()) {
if (tk.is(T_CPP_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))
return false;
@@ -83,11 +83,11 @@ bool GLSLCompleter::contextAllowsElectricCharacters(const QTextCursor &cursor) c
return false;
}
- if (pos < tk.bytesEnd())
+ if (pos < tk.utf16charsEnd())
return false;
} else if (tk.isStringLiteral() || tk.isCharLiteral()) {
const unsigned pos = cursor.selectionEnd() - cursor.block().position();
- if (pos <= tk.bytesEnd())
+ if (pos <= tk.utf16charsEnd())
return false;
}
@@ -102,7 +102,7 @@ bool GLSLCompleter::isInComment(const QTextCursor &cursor) const
if (tk.isComment()) {
const unsigned pos = cursor.selectionEnd() - cursor.block().position();
- if (pos == tk.bytesEnd()) {
+ if (pos == tk.utf16charsEnd()) {
if (tk.is(T_CPP_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))
return true;
@@ -111,7 +111,7 @@ bool GLSLCompleter::isInComment(const QTextCursor &cursor) const
return true;
}
- if (pos < tk.bytesEnd())
+ if (pos < tk.utf16charsEnd())
return true;
}