Commit Graph

2 Commits

Author SHA1 Message Date
David Schulz
2915ee0832 Core: remove impractical offset member of text position
It is just accessed when getting the length of multiline ranges and in
that case we can pass the string that range is used on to calculate the
real length.

Change-Id: I3fe95ac0cd4b05a08924a5285a75ebc5eed2423b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-01 10:51:44 +00:00
Tim Jenssen
6fe90532dc Utils: Add offset to search results
Offset are better to compute the length of a text range. The only problem
is that we get them for utf8 because that is the text representation of
source file. QTextDocument is Utf16 based, so it can not binary represent
the source file. Actually I do not see a simple performing workaround for
it.

Change-Id: Id615e1ee6a6e85c6ecc4f8044e275142409d9b46
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:33:34 +00:00