Reintroduce selectionStart, selectionEnd

This commit is contained in:
Tobias Fella
2022-10-11 17:58:49 +02:00
parent 6301dc4c7e
commit 9398c5004c
2 changed files with 43 additions and 0 deletions

View File

@@ -242,3 +242,33 @@ CompletionModel *ChatDocumentHandler::completionModel() const
{
return m_completionModel;
}
int ChatDocumentHandler::selectionStart() const
{
return m_selectionStart;
}
void ChatDocumentHandler::setSelectionStart(int position)
{
if (position == m_selectionStart) {
return;
}
m_selectionStart = position;
Q_EMIT selectionStartChanged();
}
int ChatDocumentHandler::selectionEnd() const
{
return m_selectionEnd;
}
void ChatDocumentHandler::setSelectionEnd(int position)
{
if (position == m_selectionEnd) {
return;
}
m_selectionEnd = position;
Q_EMIT selectionEndChanged();
}