forked from qt-creator/qt-creator
TextEditor: Remove unnecessary hash lookup
Change-Id: I50b80ad43c7a4dc56207497e948993946d977101 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -257,11 +257,12 @@ bool TextMarkRegistry::categoryHasColor(Id category)
|
|||||||
return m_colors.contains(category);
|
return m_colors.contains(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextMarkRegistry::setCategoryColor(Id category, Theme::Color color)
|
void TextMarkRegistry::setCategoryColor(Id category, Theme::Color newColor)
|
||||||
{
|
{
|
||||||
if (m_colors[category] == color)
|
Theme::Color &color = m_colors[category];
|
||||||
|
if (color == newColor)
|
||||||
return;
|
return;
|
||||||
m_colors[category] = color;
|
color = newColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TextMarkRegistry::defaultToolTip(Id category) const
|
QString TextMarkRegistry::defaultToolTip(Id category) const
|
||||||
|
|||||||
Reference in New Issue
Block a user