Utils: move TextPosition/Range to textutils

Change-Id: Id94a7a96f3b0f978e94850d67eb4b8fba6c18fe2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
David Schulz
2023-05-09 13:49:57 +02:00
parent fc95d7a737
commit 3f2832289d
11 changed files with 76 additions and 91 deletions

View File

@@ -193,7 +193,7 @@ bool SymbolSupport::supportsFindUsages(TextEditor::TextDocument *document) const
struct ItemData
{
Utils::Search::TextRange range;
Utils::Text::Range range;
QVariant userData;
};
@@ -616,10 +616,10 @@ QString SymbolSupport::derivePlaceholder(const QString &oldSymbol, const QString
return m_defaultSymbolMapper ? m_defaultSymbolMapper(oldSymbol) : oldSymbol;
}
Utils::Search::TextRange SymbolSupport::convertRange(const Range &range)
Utils::Text::Range SymbolSupport::convertRange(const Range &range)
{
const auto convertPosition = [](const Position &pos) {
return Utils::Search::TextPosition{pos.line() + 1, pos.character()};
return Utils::Text::Position{pos.line() + 1, pos.character()};
};
return {convertPosition(range.start()), convertPosition(range.end())};
}