diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-09-01 14:24:53 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-01 08:39:37 +0200 |
commit | 9c51bd4fc83a2ee5f3e88c49a77e7eb5c50b29da (patch) | |
tree | 9b8c3ed2cf78bb398d414f38165c08bca132fff0 /src/testlib/qtestxunitstreamer.cpp | |
parent | d90da5d99134a5f89b25c93cfe2d15f4bc5ed0e5 (diff) |
Fix various trivial formatting issues.
Change-Id: Ifa2a2dd2aa26dab178ec1334376db42fc3ebb355
Reviewed-on: http://codereview.qt.nokia.com/4029
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib/qtestxunitstreamer.cpp')
-rw-r--r-- | src/testlib/qtestxunitstreamer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testlib/qtestxunitstreamer.cpp b/src/testlib/qtestxunitstreamer.cpp index f70945add0..3e9c2feffc 100644 --- a/src/testlib/qtestxunitstreamer.cpp +++ b/src/testlib/qtestxunitstreamer.cpp @@ -80,7 +80,7 @@ void QTestXunitStreamer::indentForElement(const QTestElement* element, char* buf void QTestXunitStreamer::formatStart(const QTestElement *element, QTestCharBuffer *formatted) const { - if(!element || !formatted ) + if (!element || !formatted ) return; char indent[20]; @@ -104,7 +104,7 @@ void QTestXunitStreamer::formatEnd(const QTestElement *element, QTestCharBuffer if (!element || !formatted ) return; - if (!element->childElements()){ + if (!element->childElements()) { formatted->data()[0] = '\0'; return; } @@ -117,7 +117,7 @@ void QTestXunitStreamer::formatEnd(const QTestElement *element, QTestCharBuffer void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const { - if(!attribute || !formatted ) + if (!attribute || !formatted ) return; QTest::AttributeIndex attrindex = attribute->index(); @@ -149,7 +149,7 @@ void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTe void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const { - if(!element || !formatted ) + if (!element || !formatted ) return; // Errors are written as CDATA within system-err, comments elsewhere @@ -162,7 +162,7 @@ void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, QTes return; } - if(!element->childElements()) + if (!element->childElements()) QTest::qt_asprintf(formatted, "/>\n"); else QTest::qt_asprintf(formatted, ">\n"); @@ -190,7 +190,7 @@ void QTestXunitStreamer::outputElements(QTestElement *element, bool) const while (element) { hasChildren = element->childElements(); - if(element->elementType() != QTest::LET_Benchmark){ + if (element->elementType() != QTest::LET_Benchmark) { formatStart(element, &buf); outputString(buf.data()); @@ -199,7 +199,7 @@ void QTestXunitStreamer::outputElements(QTestElement *element, bool) const formatAfterAttributes(element, &buf); outputString(buf.data()); - if(hasChildren) + if (hasChildren) outputElements(element->childElements(), true); formatEnd(element, &buf); @@ -212,7 +212,7 @@ void QTestXunitStreamer::outputElements(QTestElement *element, bool) const void QTestXunitStreamer::outputElementAttributes(const QTestElement* element, QTestElementAttribute *attribute) const { QTestCharBuffer buf; - while(attribute){ + while (attribute) { formatAttributes(element, attribute, &buf); outputString(buf.data()); attribute = attribute->nextElement(); |