Changed BaseTextEditor::Link to use a pair of offsets (begin, end) instead of position and length.

Done with: Thorbjorn.
This commit is contained in:
Roberto Raggi
2010-02-01 16:13:21 +01:00
parent 460c47f5c6
commit 7c88796002
3 changed files with 19 additions and 21 deletions

View File

@@ -4144,8 +4144,8 @@ void BaseTextEditor::showLink(const Link &link)
QTextEdit::ExtraSelection sel;
sel.cursor = textCursor();
sel.cursor.setPosition(link.pos);
sel.cursor.setPosition(link.pos + link.length, QTextCursor::KeepAnchor);
sel.cursor.setPosition(link.begin);
sel.cursor.setPosition(link.end, QTextCursor::KeepAnchor);
sel.format = d->m_linkFormat;
sel.format.setFontUnderline(true);
setExtraSelections(OtherSelection, QList<QTextEdit::ExtraSelection>() << sel);