AutoTest: Add qInfo handling

QTest can use qInfo() to print out additional information
which was ignored (with an internal warning).
Handle these messages the same way as qDebug().

Change-Id: I84106ab232580ec9066ea5fe0c03f3be8c6d0bfd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Christian Stenger
2016-07-11 10:55:43 +02:00
parent d40c4f2797
commit 26799926cb
3 changed files with 13 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ TestResultItem::~TestResultItem()
}
static QIcon testResultIcon(Result::Type result) {
static QIcon icons[11] = {
static QIcon icons[] = {
QIcon(QLatin1String(":/images/pass.png")),
QIcon(QLatin1String(":/images/fail.png")),
QIcon(QLatin1String(":/images/xfail.png")),
@@ -56,6 +56,7 @@ static QIcon testResultIcon(Result::Type result) {
QIcon(QLatin1String(":/images/blacklisted_fail.png")),
QIcon(QLatin1String(":/images/benchmark.png")),
QIcon(QLatin1String(":/images/debug.png")),
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")),
}; // provide an icon for unknown??
@@ -298,7 +299,7 @@ void TestResultFilterModel::enableAllResultTypes()
<< Result::MessageCurrentTest << Result::MessageTestCaseStart
<< Result::MessageTestCaseSuccess << Result::MessageTestCaseWarn
<< Result::MessageTestCaseFail << Result::MessageTestCaseEnd
<< Result::MessageTestCaseRepetition;
<< Result::MessageTestCaseRepetition << Result::MessageInfo;
invalidateFilter();
}
@@ -308,10 +309,14 @@ void TestResultFilterModel::toggleTestResultType(Result::Type type)
m_enabled.remove(type);
if (type == Result::MessageInternal)
m_enabled.remove(Result::MessageTestCaseEnd);
if (type == Result::MessageDebug)
m_enabled.remove(Result::MessageInfo);
} else {
m_enabled.insert(type);
if (type == Result::MessageInternal)
m_enabled.insert(Result::MessageTestCaseEnd);
if (type == Result::MessageDebug)
m_enabled.insert(Result::MessageInfo);
}
invalidateFilter();
}