diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-10-11 14:11:43 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-10-17 07:16:04 +0000 |
commit | cafd5ced1ab02d79e3765f059b66c6b3b6533e73 (patch) | |
tree | 1e717e2ee9db895edb5f9833609aeeb7c0532640 /src/libs/utils/textutils.h | |
parent | 6f73b3b175086f948eee6b3097fa50aa0a52ab53 (diff) |
Clang: Significantly improve ClangFormat plugin usability
What's new:
1. New LibFormat option is used to prevent lines shrink,
which allows to drop most of tricks used before for that purpose.
2. Cached UTF-8 source code is used to improve performance
3. Improved error handling.
4. Slightly improved UI.
Change-Id: I4605200fa103167369a40650b2e1ad2c61e8133b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/libs/utils/textutils.h')
-rw-r--r-- | src/libs/utils/textutils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/utils/textutils.h b/src/libs/utils/textutils.h index d5414e3194..01d765e786 100644 --- a/src/libs/utils/textutils.h +++ b/src/libs/utils/textutils.h @@ -55,6 +55,10 @@ QTCREATOR_UTILS_EXPORT QTextCursor flippedCursor(const QTextCursor &cursor); QTCREATOR_UTILS_EXPORT QTextCursor wordStartCursor(const QTextCursor &cursor); +QTCREATOR_UTILS_EXPORT int utf8NthLineOffset(const QTextDocument *textDocument, + const QByteArray &buffer, + int line); + template <class CharacterProvider> void moveToPrevChar(CharacterProvider &provider, QTextCursor &cursor) { |