forked from qt-creator/qt-creator
Editor: Simplify text marks
Moving defaultToolTip and color from TextMarkRegistry to TextMark. Allowing every instance of a TextMark object to define these information. Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -5771,8 +5771,7 @@ void TextEditorWidgetPrivate::addSearchResultsToScrollBar(QVector<SearchResult>
|
||||
|
||||
Highlight markToHighlight(TextMark *mark, int lineNumber)
|
||||
{
|
||||
return Highlight(mark->category(), lineNumber,
|
||||
TextMark::categoryColor(mark->category()),
|
||||
return Highlight(mark->category(), lineNumber, mark->color(),
|
||||
textMarkPrioToScrollBarPrio(mark->priority()));
|
||||
}
|
||||
|
||||
@@ -5791,8 +5790,7 @@ void TextEditorWidgetPrivate::updateHighlightScrollBarNow()
|
||||
|
||||
// update text marks
|
||||
foreach (TextMark *mark, m_document->marks()) {
|
||||
Id category = mark->category();
|
||||
if (!mark->isVisible() || !TextMark::categoryHasColor(category))
|
||||
if (!mark->isVisible() || !mark->hasColor())
|
||||
continue;
|
||||
const QTextBlock &block = q->document()->findBlockByNumber(mark->lineNumber() - 1);
|
||||
if (block.isVisible())
|
||||
|
||||
Reference in New Issue
Block a user