refactor: remove ColorProvider::setColor (#5112)
We now either: 1) Rely on the setting updating the color 2) Use ColorProvider::color to set the underlying color
This commit is contained in:
@@ -465,8 +465,6 @@ void HighlightModel::customRowSetData(const std::vector<QStandardItem *> &row,
|
||||
const auto setColor = [&](auto &setting, ColorType ty) {
|
||||
auto color = value.value<QColor>();
|
||||
setting.setValue(color.name(QColor::HexArgb));
|
||||
const_cast<ColorProvider &>(ColorProvider::instance())
|
||||
.updateColor(ty, color);
|
||||
};
|
||||
|
||||
if (rowIndex == HighlightRowIndexes::SelfHighlightRow)
|
||||
|
||||
@@ -103,10 +103,6 @@ void UserHighlightModel::customRowSetData(
|
||||
// Update the setting with the new value
|
||||
getSettings()->selfMessageHighlightColor.setValue(
|
||||
colorName);
|
||||
// Update the color provider with the new color to be used for future
|
||||
const_cast<ColorProvider &>(ColorProvider::instance())
|
||||
.updateColor(ColorType::SelfMessageHighlight,
|
||||
QColor(colorName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user