forked from qt-creator/qt-creator
Merge ITextMark and BaseTextMark
Turns out we don't even need two-phase initialization, by transparently postponing registration until we get a non-empty file name, either at constuction, or at file name change times. Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -3933,7 +3933,7 @@ void BaseTextEditorWidget::extraAreaPaintEvent(QPaintEvent *e)
|
||||
}
|
||||
TextMarks::const_iterator end = marks.constEnd();
|
||||
for ( ; it != end; ++it) {
|
||||
ITextMark *mark = *it;
|
||||
TextMark *mark = *it;
|
||||
if (!mark->isVisible())
|
||||
continue;
|
||||
const int height = fmLineSpacing - 1;
|
||||
@@ -4605,7 +4605,7 @@ void BaseTextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
|
||||
if (TextBlockUserData *data = static_cast<TextBlockUserData *>(block.userData())) {
|
||||
TextMarks marks = data->marks();
|
||||
for (int i = marks.size(); --i >= 0; ) {
|
||||
ITextMark *mark = marks.at(i);
|
||||
TextMark *mark = marks.at(i);
|
||||
if (mark->isDraggable()) {
|
||||
d->m_markDragStart = e->pos();
|
||||
break;
|
||||
@@ -4653,7 +4653,7 @@ void BaseTextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
|
||||
if (TextBlockUserData *data = static_cast<TextBlockUserData *>(block.userData())) {
|
||||
TextMarks marks = data->marks();
|
||||
for (int i = marks.size(); --i >= 0; ) {
|
||||
ITextMark *mark = marks.at(i);
|
||||
TextMark *mark = marks.at(i);
|
||||
if (sameLine) {
|
||||
if (mark->isClickable()) {
|
||||
mark->clicked();
|
||||
|
||||
Reference in New Issue
Block a user