summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljscontext.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-10-10 10:55:37 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-10-12 10:55:55 +0200
commit7ed717ca62ab080231d019d8b3e378ebd852be5d (patch)
treecda330220fb2e7f3fc6afdd8e9d2be0aa77cbb05 /src/libs/qmljs/qmljscontext.cpp
parent572b3a180b30223aa92678ded7b253051a0a5cb0 (diff)
downloadqt-creator-7ed717ca62ab080231d019d8b3e378ebd852be5d.tar.gz
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>
Diffstat (limited to 'src/libs/qmljs/qmljscontext.cpp')
-rw-r--r--src/libs/qmljs/qmljscontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljscontext.cpp b/src/libs/qmljs/qmljscontext.cpp
index c52471d64d..648702b111 100644
--- a/src/libs/qmljs/qmljscontext.cpp
+++ b/src/libs/qmljs/qmljscontext.cpp
@@ -134,11 +134,11 @@ QString Context::defaultPropertyName(const ObjectValue *object) const
PrototypeIterator iter(object, this);
while (iter.hasNext()) {
const ObjectValue *o = iter.next();
- if (const ASTObjectValue *astObjValue = dynamic_cast<const ASTObjectValue *>(o)) {
+ if (const ASTObjectValue *astObjValue = value_cast<ASTObjectValue>(o)) {
QString defaultProperty = astObjValue->defaultPropertyName();
if (!defaultProperty.isEmpty())
return defaultProperty;
- } else if (const CppComponentValue *qmlValue = dynamic_cast<const CppComponentValue *>(o)) {
+ } else if (const CppComponentValue *qmlValue = value_cast<CppComponentValue>(o)) {
return qmlValue->defaultPropertyName();
}
}
@@ -151,7 +151,7 @@ ReferenceContext::ReferenceContext(const ContextPtr &context)
const Value *ReferenceContext::lookupReference(const Value *value)
{
- const Reference *reference = value_cast<const Reference *>(value);
+ const Reference *reference = value_cast<Reference>(value);
if (!reference)
return value;