Changeset 769 for trunk/src/testlib/qtestlogger.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/testlib/qtestlogger.cpp
r651 r769 212 212 failureElement->addAttribute(QTest::AI_Line, buf); 213 213 failureElement->addAttribute(QTest::AI_Description, description); 214 const char* tag = QTestResult::currentDataTag(); 215 if (tag) { 216 failureElement->addAttribute(QTest::AI_Tag, tag); 217 } 214 addTag(failureElement); 218 215 currentLogElement->addLogElement(failureElement); 219 216 } … … 278 275 } 279 276 277 void QTestLogger::addTag(QTestElement* element) 278 { 279 const char *tag = QTestResult::currentDataTag(); 280 const char *gtag = QTestResult::currentGlobalDataTag(); 281 const char *filler = (tag && gtag) ? ":" : ""; 282 if ((!tag || !tag[0]) && (!gtag || !gtag[0])) { 283 return; 284 } 285 286 if (!tag) { 287 tag = ""; 288 } 289 if (!gtag) { 290 gtag = ""; 291 } 292 293 QTestCharBuffer buf; 294 QTest::qt_asprintf(&buf, "%s%s%s", gtag, filler, tag); 295 element->addAttribute(QTest::AI_Tag, buf.constData()); 296 } 297 280 298 void QTestLogger::addMessage(MessageTypes type, const char *message, const char *file, int line) 281 299 { … … 298 316 case QAbstractTestLogger::QWarning: 299 317 ++qwarnCounter; 300 typeBuf = "qwarn ing";318 typeBuf = "qwarn"; 301 319 break; 302 320 case QAbstractTestLogger::QFatal: … … 319 337 errorElement->addAttribute(QTest::AI_Type, typeBuf); 320 338 errorElement->addAttribute(QTest::AI_Description, message); 339 addTag(errorElement); 321 340 322 341 if(file)
Note:
See TracChangeset
for help on using the changeset viewer.