summaryrefslogtreecommitdiffstats
path: root/tests/auto/qxmlquery/PushBaseliner.h
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-09 08:21:18 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-10 02:49:05 (GMT)
commitb841d30f25a87f8aafc4624fe09a3503ddc6ccda (patch)
tree19d2e84397d0b3890c1d073f3cee49c7f80fcb77 /tests/auto/qxmlquery/PushBaseliner.h
parent6e3fcd6ff50e6435fd90629ed695196d25312ffc (diff)
downloadQt-b841d30f25a87f8aafc4624fe09a3503ddc6ccda.zip
Qt-b841d30f25a87f8aafc4624fe09a3503ddc6ccda.tar.gz
Qt-b841d30f25a87f8aafc4624fe09a3503ddc6ccda.tar.bz2
Remove Q_ASSERT from qxmlquery autotest
Make stream validity check part of the regular test logic rather than aborting in debug builds and ignoring the error in release builds. Change-Id: I07dcba079eecd88bf16672c6019a8d6f5a829fee Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qxmlquery/PushBaseliner.h')
-rw-r--r--tests/auto/qxmlquery/PushBaseliner.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qxmlquery/PushBaseliner.h b/tests/auto/qxmlquery/PushBaseliner.h
index 0648c90..8478a6a 100644
--- a/tests/auto/qxmlquery/PushBaseliner.h
+++ b/tests/auto/qxmlquery/PushBaseliner.h
@@ -65,9 +65,9 @@ public:
const QXmlNamePool &namePool) : m_out(out)
, m_namePool(namePool)
{
- Q_ASSERT(m_out.codec());
}
+ bool isValid() const;
virtual void startElement(const QXmlName&);
virtual void endElement();
virtual void attribute(const QXmlName&, const QStringRef&);
@@ -86,6 +86,11 @@ private:
const QXmlNamePool m_namePool;
};
+bool PushBaseliner::isValid() const
+{
+ return m_out.codec();
+}
+
void PushBaseliner::startElement(const QXmlName &name)
{
m_out << "startElement(" << name.toClarkName(m_namePool) << ')'<< endl;