diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-05-06 00:46:35 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-05-06 01:06:05 (GMT) |
commit | 826bc847e6601f834a3ece8c001a8dd2bfa2fe97 (patch) | |
tree | e7483fbdb98b70f3c5a2842cbc6c0cc4cb7b3793 /src/testlib/qtestlogger.cpp | |
parent | 9a60df38330c8a37d48e4e3f8fbdfc067b320cb5 (diff) | |
download | Qt-826bc847e6601f834a3ece8c001a8dd2bfa2fe97.zip Qt-826bc847e6601f834a3ece8c001a8dd2bfa2fe97.tar.gz Qt-826bc847e6601f834a3ece8c001a8dd2bfa2fe97.tar.bz2 |
Fixed invalid XML from testlib: `<Incident type="fail" (null)="" ...'
When failing without a filename, setting file to 0 does not work.
File must be set to "".
Autotest: 2d194009379a4e199ec246ca053ee97ee733482f
Diffstat (limited to 'src/testlib/qtestlogger.cpp')
-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); |