diff options
-rw-r--r-- | src/testlib/qtestlogger.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/testlib/qtestlogger.cpp b/src/testlib/qtestlogger.cpp index c053c30..a1a6d52 100644 --- a/src/testlib/qtestlogger.cpp +++ b/src/testlib/qtestlogger.cpp @@ -158,7 +158,10 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description, if (type == QAbstractTestLogger::Fail || type == QAbstractTestLogger::XFail) { QTestElement *failureElement = new QTestElement(QTest::LET_Failure); failureElement->addAttribute(QTest::AI_Result, typeBuf); - failureElement->addAttribute(QTest::AI_File, file); + if(file) + failureElement->addAttribute(QTest::AI_File, file); + else + failureElement->addAttribute(QTest::AI_File, ""); QTest::qt_snprintf(buf, sizeof(buf), "%i", line); failureElement->addAttribute(QTest::AI_Line, buf); failureElement->addAttribute(QTest::AI_Description, description); |