summaryrefslogtreecommitdiff
path: root/doc/src
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 /doc/src
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 'doc/src')
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp6
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
index 9cd0ad1..fce0e30 100644
--- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
@@ -133,8 +133,10 @@
}
}
else if (item.isNode()) {
+#ifdef qdoc
QXmlNodeModelIndex i = item.toNodeModelIndex();
// process node
+#endif // qdoc
}
item = result.next();
}
@@ -163,8 +165,10 @@
break;
default:
if (v.userType() == qMetaTypeId<QXmlName>()) {
+#ifdef qdoc
QXmlName n = qvariant_cast<QXmlName>(v);
// process QXmlName n...
+#endif // qdoc
}
else {
// error
@@ -173,8 +177,10 @@
}
}
else if (item.isNode()) {
+#ifdef qdoc
QXmlNodeModelIndex i = item.toNodeModelIndex();
// process node
+#endif // qdoc
}
item = result.next();
}
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
index 64b6398..baca131 100644
--- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
@@ -50,7 +50,8 @@ if (query.isValid()) {
// use item
item = result.next();
}
- if (result.hasError())
- /* Runtime error! */;
+ if (result.hasError()) {
+ /* Runtime error! */
+ }
}
//! [0]