QmlJS: Add more value_casts.

And switch all existing dynamic_casts to value_casts.

Change-Id: I93b89358e4802080f40b332074c64f4e91a2bc4c
Reviewed-on: http://codereview.qt-project.org/6311
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-10 10:55:37 +02:00
parent 572b3a180b
commit 7ed717ca62
14 changed files with 161 additions and 63 deletions

View File

@@ -138,7 +138,7 @@ protected:
PrototypeIterator it(v, m_scopeChain.context());
while (it.hasNext()) {
const ObjectValue *proto = it.next();
const CppComponentValue *qmlProto = dynamic_cast<const CppComponentValue *>(proto);
const CppComponentValue *qmlProto = value_cast<CppComponentValue>(proto);
if (!qmlProto)
continue;
if (qmlProto->metaObject() == m_statePrototype->metaObject())