chore: Re-simplify IndexVersionType and MessageLevel with c++20
This sets our compiler requirements to gcc 11 and clang 13. If we forgo the use of `using enum` we can drop to gcc 10 and clang 10 but that means using `MessageLevel::Enum::Unknown` for direct enum access Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
@@ -60,7 +60,7 @@ QVariant LogFormatProxyModel::data(const QModelIndex& index, int role) const
|
||||
case Qt::FontRole:
|
||||
return m_font;
|
||||
case Qt::ForegroundRole: {
|
||||
auto level = static_cast<MessageLevel>(QIdentityProxyModel::data(index, LogModel::LevelRole).toInt());
|
||||
MessageLevel level = static_cast<MessageLevel::Enum>(QIdentityProxyModel::data(index, LogModel::LevelRole).toInt());
|
||||
QColor result = colors.foreground.value(level);
|
||||
|
||||
if (result.isValid())
|
||||
@@ -69,7 +69,7 @@ QVariant LogFormatProxyModel::data(const QModelIndex& index, int role) const
|
||||
break;
|
||||
}
|
||||
case Qt::BackgroundRole: {
|
||||
auto level = static_cast<MessageLevel>(QIdentityProxyModel::data(index, LogModel::LevelRole).toInt());
|
||||
MessageLevel level = static_cast<MessageLevel::Enum>(QIdentityProxyModel::data(index, LogModel::LevelRole).toInt());
|
||||
QColor result = colors.background.value(level);
|
||||
|
||||
if (result.isValid())
|
||||
|
||||
Reference in New Issue
Block a user