forked from qt-creator/qt-creator
C++: Use Token::utf16chars{Begin,End} where appropriate
...especially in CppTools/CppEditor where the offsets are used with a QString/QTextDocument. Change-Id: Ic6d18fbc01fb9cc899a9bd2d7424cd2edae487f1 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -225,8 +225,8 @@ protected:
|
||||
// go through comments backwards to find the annotation closest to the call
|
||||
for (unsigned i = _doc->translationUnit()->commentCount(); i-- > 0; ) {
|
||||
const Token commentToken = _doc->translationUnit()->commentAt(i);
|
||||
if (commentToken.bytesBegin() >= end.bytesBegin()
|
||||
|| commentToken.bytesEnd() <= begin.bytesBegin()) {
|
||||
if (commentToken.utf16charsBegin() >= end.utf16charsBegin()
|
||||
|| commentToken.utf16charsEnd() <= begin.utf16charsBegin()) {
|
||||
continue;
|
||||
}
|
||||
const QString comment = stringOf(commentToken);
|
||||
|
||||
Reference in New Issue
Block a user