use consistent way to detect if colored message should be logged in messageType2String()

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-12-20 23:44:45 +00:00
parent d555626f1d
commit d6dc3efd9e

View file

@ -83,7 +83,7 @@ namespace QTest {
static const char *messageType2String(QAbstractTestLogger::MessageTypes type)
{
static bool colored = ::getenv("QTEST_COLORED");
static bool colored = (!qgetenv("QTEST_COLORED").isEmpty());
switch (type) {
case QAbstractTestLogger::Skip:
return COLORED_MSG(0, 37, "SKIP "); //white