diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-06 04:16:48 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-10 02:46:03 (GMT) |
commit | f859ab10715a3cb69aa3f03574a046c886d34b44 (patch) | |
tree | da5a0f3b4b4dde3e12331390e02b294e418e9021 | |
parent | fe170938cf963e0a0a20b19f97ee6e18b6808a90 (diff) | |
download | Qt-f859ab10715a3cb69aa3f03574a046c886d34b44.zip Qt-f859ab10715a3cb69aa3f03574a046c886d34b44.tar.gz Qt-f859ab10715a3cb69aa3f03574a046c886d34b44.tar.bz2 |
Remove Q_ASSERT from qabstractxmlnodemodel test
If new "axis" enum values are added in the future, the test should
report a meaningful warning in the test output rather than aborting with
a meaningless message in debug builds and failing silently in release
builds.
Change-Id: Ifdc7a9492c3ee196d7f0e6958eec34693efd244f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
-rw-r--r-- | tests/auto/qabstractxmlnodemodel/LoadingModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp index 2ce9466..052c781 100644 --- a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp +++ b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp @@ -173,10 +173,10 @@ QXmlNodeModelIndex LoadingModel::nextFromSimpleAxis(QAbstractXmlNodeModel::Simpl return internal->precedingSibling ? createIndex(internal->precedingSibling) : QXmlNodeModelIndex(); case NextSibling: return internal->followingSibling ? createIndex(internal->followingSibling) : QXmlNodeModelIndex(); + default: + qWarning("%s: unknown axis enum value %d", Q_FUNC_INFO, static_cast<int>(axis)); + return QXmlNodeModelIndex(); } - - Q_ASSERT(false); - return QXmlNodeModelIndex(); } QVector<QXmlNodeModelIndex> LoadingModel::attributes(const QXmlNodeModelIndex &ni) const |