diff options
author | Christian Kamm <[email protected]> | 2011-10-10 10:55:37 +0200 |
---|---|---|
committer | Christian Kamm <[email protected]> | 2011-10-12 10:55:55 +0200 |
commit | 7ed717ca62ab080231d019d8b3e378ebd852be5d (patch) | |
tree | cda330220fb2e7f3fc6afdd8e9d2be0aa77cbb05 /src/libs/qmljs/qmljsscopebuilder.cpp | |
parent | 572b3a180b30223aa92678ded7b253051a0a5cb0 (diff) |
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 <[email protected]>
Reviewed-by: Thomas Hartmann <[email protected]>
Reviewed-by: Fawzi Mohamed <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsscopebuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp index d960fab39aa..dda5496bc5d 100644 --- a/src/libs/qmljs/qmljsscopebuilder.cpp +++ b/src/libs/qmljs/qmljsscopebuilder.cpp @@ -185,7 +185,7 @@ void ScopeBuilder::setQmlScopeObject(Node *node) iter.next(); while (iter.hasNext()) { const ObjectValue *prototype = iter.next(); - if (const CppComponentValue *qmlMetaObject = dynamic_cast<const CppComponentValue *>(prototype)) { + if (const CppComponentValue *qmlMetaObject = value_cast<CppComponentValue>(prototype)) { if ((qmlMetaObject->className() == QLatin1String("ListElement") || qmlMetaObject->className() == QLatin1String("Connections") ) && (qmlMetaObject->moduleName() == QLatin1String("Qt") @@ -211,7 +211,7 @@ void ScopeBuilder::setQmlScopeObject(Node *node) Evaluate evaluator(_scopeChain); const Value *targetValue = evaluator(scriptBinding->statement); - if (const ObjectValue *target = value_cast<const ObjectValue *>(targetValue)) { + if (const ObjectValue *target = value_cast<ObjectValue>(targetValue)) { qmlScopeObjects.prepend(target); } else { qmlScopeObjects.clear(); @@ -259,7 +259,7 @@ const ObjectValue *ScopeBuilder::isPropertyChangesObject(const ContextPtr &conte PrototypeIterator iter(object, context); while (iter.hasNext()) { const ObjectValue *prototype = iter.next(); - if (const CppComponentValue *qmlMetaObject = dynamic_cast<const CppComponentValue *>(prototype)) { + if (const CppComponentValue *qmlMetaObject = value_cast<CppComponentValue>(prototype)) { if (qmlMetaObject->className() == QLatin1String("PropertyChanges") && (qmlMetaObject->moduleName() == QLatin1String("Qt") || qmlMetaObject->moduleName() == QLatin1String("QtQuick"))) |