Commit e51443ce authored by Christian Stenger's avatar Christian Stenger

AutoTest: Add handling for system messages

QTest uses special type for critical and for special internal messages.

Change-Id: I980b2ccd2913012be24183ea503247331eeb97e1
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 48b2af5e
......@@ -71,6 +71,8 @@ Result::Type TestResult::resultFromString(const QString &resultString)
return Result::MessageWarn;
if (resultString == QLatin1String("qfatal"))
return Result::MessageFatal;
if (resultString == QLatin1String("system"))
return Result::MessageSystem;
if (resultString == QLatin1String("bpass"))
return Result::BlacklistedPass;
if (resultString == QLatin1String("bfail"))
......@@ -113,6 +115,8 @@ QString TestResult::resultToString(const Result::Type type)
return QLatin1String("WARN");
case Result::MessageFatal:
return QLatin1String("FATAL");
case Result::MessageSystem:
return QLatin1String("SYSTEM");
case Result::BlacklistedPass:
return QLatin1String("BPASS");
case Result::BlacklistedFail:
......@@ -145,6 +149,7 @@ QColor TestResult::colorForType(const Result::Type type)
case Result::MessageWarn:
return creatorTheme->color(Utils::Theme::OutputPanes_TestWarnTextColor);
case Result::MessageFatal:
case Result::MessageSystem:
return creatorTheme->color(Utils::Theme::OutputPanes_TestFatalTextColor);
case Result::BlacklistedPass:
case Result::BlacklistedFail:
......
......@@ -49,6 +49,7 @@ enum Type {
MessageInfo,
MessageWarn,
MessageFatal,
MessageSystem,
MessageInternal, INTERNAL_MESSAGES_BEGIN = MessageInternal,
MessageDisabledTests,
......
......@@ -59,6 +59,7 @@ static QIcon testResultIcon(Result::Type result) {
QIcon(QLatin1String(":/images/debug.png")), // Info get's the same handling as Debug for now
QIcon(QLatin1String(":/images/warn.png")),
QIcon(QLatin1String(":/images/fatal.png")),
QIcon(QLatin1String(":/images/fatal.png")), // System get's same handling as Fatal for now
}; // provide an icon for unknown??
if (result < 0 || result >= Result::MessageInternal) {
......@@ -299,7 +300,7 @@ void TestResultFilterModel::enableAllResultTypes()
<< Result::MessageCurrentTest << Result::MessageTestCaseStart
<< Result::MessageTestCaseSuccess << Result::MessageTestCaseWarn
<< Result::MessageTestCaseFail << Result::MessageTestCaseEnd
<< Result::MessageTestCaseRepetition << Result::MessageInfo;
<< Result::MessageTestCaseRepetition << Result::MessageInfo << Result::MessageSystem;
invalidateFilter();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment