diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2011-07-19 16:07:46 (GMT) |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2011-07-20 13:46:17 (GMT) |
commit | f9d3db47f1b099d85c61a215e6479b4b3ca81ee0 (patch) | |
tree | fe6da3c63acfa0d9af96e9da7ab6362d8a324ab1 /src/declarative | |
parent | bdbc3ff0a32bb37a32dc4825413e60f9d75e5007 (diff) | |
download | Qt-f9d3db47f1b099d85c61a215e6479b4b3ca81ee0.zip Qt-f9d3db47f1b099d85c61a215e6479b4b3ca81ee0.tar.gz Qt-f9d3db47f1b099d85c61a215e6479b4b3ca81ee0.tar.bz2 |
Qml Debugging: only read properties that can be displayed in the debugger
Change-Id: I68a6636aae271924bcec31ce7ad76c01fc43080b
Task-number: QTCREATORBUG-5075
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativeenginedebug.cpp | 12 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativewatcher.cpp | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 8f22314..8707a7f 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -147,12 +147,6 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) if (binding) rv.binding = binding->expression(); - QVariant value; - if (prop.userType() != 0) { - value = prop.read(obj); - } - rv.value = valueContents(value); - if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { rv.type = QDeclarativeObjectProperty::Basic; } else if (QDeclarativeMetaType::isQObject(prop.userType())) { @@ -161,6 +155,12 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) rv.type = QDeclarativeObjectProperty::List; } + QVariant value; + if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) { + value = prop.read(obj); + } + rv.value = valueContents(value); + return rv; } diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/declarative/qml/qdeclarativewatcher.cpp index c174998..33f0358 100644 --- a/src/declarative/qml/qdeclarativewatcher.cpp +++ b/src/declarative/qml/qdeclarativewatcher.cpp @@ -47,6 +47,7 @@ #include <qdeclarativedebugservice_p.h> #include "private/qdeclarativeproperty_p.h" +#include "private/qdeclarativevaluetype_p.h" #include <QtCore/qmetaobject.h> #include <QtCore/qdebug.h> @@ -112,7 +113,7 @@ void QDeclarativeWatchProxy::notifyValueChanged() QVariant v; if (m_expr) v = m_expr->evaluate(); - else + else if (QDeclarativeValueTypeFactory::isValueType(m_property.userType())) v = m_property.read(m_object); emit m_watch->propertyChanged(m_id, m_debugId, m_property, v); |