From f5f2f4d1cda47ba67e821495da0a9707c10a708c Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 31 Jan 2011 09:36:52 +1000 Subject: Use qobject_cast rather than dynamic_cast. To complile on platforms without rtti. Reviewed-by: Michael Brasser --- src/declarative/qml/qdeclarativeenginedebug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 3863385..8c7f3ad 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -327,7 +327,7 @@ void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, b void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj) { - if (QDeclarativeState *state = dynamic_cast(obj)) { + if (QDeclarativeState *state = qobject_cast(obj)) { m_allStates.append(state); } @@ -589,7 +589,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, } else { // not a valid property - if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { if (isLiteralValue) { propertyChanges->changeValue(propertyName, expression); } else { @@ -637,7 +637,7 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr } } } else { - if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { propertyChanges->removeProperty(propertyName); } } -- cgit v0.12