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 @@ std::optional<LogParser::LogEntry> LogParser::parseAttributes()
|
||||
entry.timestamp = QDateTime::fromSecsSinceEpoch(value.trimmed().toLongLong());
|
||||
} else if (name == "level"_L1) {
|
||||
entry.levelText = value.trimmed().toString();
|
||||
entry.level = messageLevelFromName(entry.levelText);
|
||||
entry.level = MessageLevel::fromName(entry.levelText);
|
||||
} else if (name == "thread"_L1) {
|
||||
entry.thread = value.trimmed().toString();
|
||||
}
|
||||
@@ -329,7 +329,7 @@ MessageLevel LogParser::guessLevel(const QString& line, MessageLevel previous)
|
||||
QString timestamp = match.captured("timestamp");
|
||||
QString levelStr = match.captured("level");
|
||||
|
||||
return messageLevelFromName(levelStr);
|
||||
return MessageLevel::fromName(levelStr);
|
||||
} else {
|
||||
// Old style forge logs
|
||||
if (line.contains("[INFO]") || line.contains("[CONFIG]") || line.contains("[FINE]") || line.contains("[FINER]") ||
|
||||
|
||||
Reference in New Issue
Block a user