summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2010-12-16 10:30:17 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2010-12-16 10:44:48 (GMT)
commitfa57982fadab625fb022d32f690ef05427920581 (patch)
tree711c11afd8310b64c4b16e10fc0b1dbb2375992b /src/declarative/qml
parent14b4c009f9b0b83d16aec9f5b396f97efd49458c (diff)
downloadQt-fa57982fadab625fb022d32f690ef05427920581.zip
Qt-fa57982fadab625fb022d32f690ef05427920581.tar.gz
Qt-fa57982fadab625fb022d32f690ef05427920581.tar.bz2
QmlDebugger: Fix runtime warnings about unregistered metatypes
Check whether the type of a property is known to the metatype system before trying to read from it. That avoids lots of runtime warnings e.g. for the QSequentialGroup::currentAnimation property, which type QAbstractAnimation * isn't registered by default via qRegisterMetaType<>(). Reviewed-by: Christiaan Janssen Task-number: QTCREATORBUG-2853
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index bffe681..e54f7d6 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -146,7 +146,10 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx)
if (binding)
rv.binding = binding->expression();
- QVariant value = prop.read(obj);
+ QVariant value;
+ if (prop.userType() != 0) {
+ value = prop.read(obj);
+ }
rv.value = valueContents(value);
if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) {