Remove Q_ASSERT from QXmlStream autotest

Report a meaningful fatal error if an unknown token type is encountered
rather than ignoring the error in non-debug builds and reporting an
uninformative message in debug builds.

Change-Id: Id219f3c7cbd4ba3e9875cb81f833720d5d153132
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 1c85fc559ee456a165527d23cb1b7dc237f5504b)
This commit is contained in:
Jason McDonald 2011-05-10 13:19:25 +10:00 committed by Rohan McGovern
parent d35fcd3053
commit 5f88d1fd08

View File

@ -191,9 +191,9 @@ bool QC14N::isDifferent(const QXmlStreamReader &r1,
r2.processingInstructionData() == r2.processingInstructionData();
}
default:
qFatal("%s: Unknown tokenType: %d", Q_FUNC_INFO, static_cast<int>(r1.tokenType()));
return false;
}
Q_ASSERT_X(false, Q_FUNC_INFO, "This line should never be reached");
return false;
}