summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-24 10:22:33 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-25 10:45:26 +0200
commit04cd6d9569e3034e57108e8309c353c13803abe8 (patch)
tree8567026788c4d15e67b7bb39feb036fe5830491e /tests
parent4f485fab26b986a38b0caee7bbf4b16cd265f329 (diff)
downloadqtxmlpatterns-04cd6d9569e3034e57108e8309c353c13803abe8.tar.gz
QtXmlPatterns: Fix compiler warnings.
QString conversions, assigned/unused variables, braces around ambiguous else. Also fixed coding style in the affected lines to make the sanity bot happy. Change-Id: I85e440861ec9e8177a6cf9a017dc981a25212f54 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/xmlpatternssdk/TestBaseLine.cpp13
-rw-r--r--tests/auto/xmlpatternssdk/XMLWriter.cpp3
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/auto/xmlpatternssdk/TestBaseLine.cpp b/tests/auto/xmlpatternssdk/TestBaseLine.cpp
index f8b62d3..5168565 100644
--- a/tests/auto/xmlpatternssdk/TestBaseLine.cpp
+++ b/tests/auto/xmlpatternssdk/TestBaseLine.cpp
@@ -179,12 +179,11 @@ void TestBaseLine::toXML(XMLWriter &receiver) const
bool TestBaseLine::isChildrenDeepEqual(const QDomNodeList &cl1, const QDomNodeList &cl2)
{
- const unsigned int len = cl1.length();
+ const int len = cl1.length();
if(len == cl2.length())
{
- for(unsigned int i = 0; i < len; ++i)
- {
+ for (int i = 0; i < len; ++i) {
if(!isDeepEqual(cl1.at(i), cl2.at(i)))
return false;
}
@@ -197,21 +196,19 @@ bool TestBaseLine::isChildrenDeepEqual(const QDomNodeList &cl1, const QDomNodeLi
bool TestBaseLine::isAttributesEqual(const QDomNamedNodeMap &cl1, const QDomNamedNodeMap &cl2)
{
- const unsigned int len = cl1.length();
+ const int len = cl1.length();
pDebug() << "LEN:" << len;
if(len == cl2.length())
{
- for(unsigned int i1 = 0; i1 < len; ++i1)
- {
+ for (int i1 = 0; i1 < len; ++i1) {
const QDomNode attr1(cl1.item(i1));
Q_ASSERT(!attr1.isNull());
/* This is set if attr1 cannot be found at all in cl2. */
bool earlyExit = false;
- for(unsigned int i2 = 0; i2 < len; ++i2)
- {
+ for (int i2 = 0; i2 < len; ++i2) {
const QDomNode attr2(cl2.item(i2));
Q_ASSERT(!attr2.isNull());
pDebug() << "ATTR1:" << attr1.localName() << attr1.namespaceURI() << attr1.prefix() << attr1.nodeName();
diff --git a/tests/auto/xmlpatternssdk/XMLWriter.cpp b/tests/auto/xmlpatternssdk/XMLWriter.cpp
index 40f4a4e..a81a986 100644
--- a/tests/auto/xmlpatternssdk/XMLWriter.cpp
+++ b/tests/auto/xmlpatternssdk/XMLWriter.cpp
@@ -571,8 +571,9 @@ bool XMLWriter::startDTD(const QString &name,
if(!systemId.isEmpty())
{
- if(publicId.isEmpty())
+ if (publicId.isEmpty()) {
serialize(" SYSTEM");
+ }
serialize(" \"");
serialize(systemId);