Utils: Move common positionInText function to Utils::Text

Change-Id: I5d74a73058ca457b0fb3f13eaf945f224d5699fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-06-15 14:33:01 +02:00
parent b6dfab804b
commit a91956f300
4 changed files with 29 additions and 26 deletions

View File

@@ -43,6 +43,9 @@ QTCREATOR_UTILS_EXPORT bool convertPosition(const QTextDocument *document,
QTCREATOR_UTILS_EXPORT
Utils::OptionalLineColumn convertPosition(const QTextDocument *document, int pos);
// line and column are 1-based
QTCREATOR_UTILS_EXPORT int positionInText(QTextDocument *textDocument, int line, int column);
QTCREATOR_UTILS_EXPORT QString textAt(QTextCursor tc, int pos, int length);
QTCREATOR_UTILS_EXPORT QTextCursor selectAt(QTextCursor textCursor, uint line, uint column, uint length);