Skip to content
Snippets Groups Projects
Commit af91d73a authored by David Schulz's avatar David Schulz
Browse files

TextEditor: Remove unnecessary hash lookup


Change-Id: I50b80ad43c7a4dc56207497e948993946d977101
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 4372514e
No related branches found
No related tags found
No related merge requests found
...@@ -257,11 +257,12 @@ bool TextMarkRegistry::categoryHasColor(Id category) ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment