summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-01-30 23:36:52 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-01-30 23:36:52 (GMT)
commitf5f2f4d1cda47ba67e821495da0a9707c10a708c (patch)
treebf8d1fbd462dc8fb93ca161dd6dd07006fed99b1
parent502f3b5f38f80d0eb7be1516a22cd051fb03873d (diff)
downloadQt-f5f2f4d1cda47ba67e821495da0a9707c10a708c.zip
Qt-f5f2f4d1cda47ba67e821495da0a9707c10a708c.tar.gz
Qt-f5f2f4d1cda47ba67e821495da0a9707c10a708c.tar.bz2
Use qobject_cast rather than dynamic_cast.
To complile on platforms without rtti. Reviewed-by: Michael Brasser
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp6
1 files 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<QDeclarativeState *>(obj)) {
+ if (QDeclarativeState *state = qobject_cast<QDeclarativeState *>(obj)) {
m_allStates.append(state);
}
@@ -589,7 +589,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
} else {
// not a valid property
- if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast<QDeclarativePropertyChanges *>(object)) {
+ if (QDeclarativePropertyChanges *propertyChanges = qobject_cast<QDeclarativePropertyChanges *>(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<QDeclarativePropertyChanges *>(object)) {
+ if (QDeclarativePropertyChanges *propertyChanges = qobject_cast<QDeclarativePropertyChanges *>(object)) {
propertyChanges->removeProperty(propertyName);
}
}