diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-22 04:56:49 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-22 05:53:27 (GMT) |
commit | 33eb76f050b45718d87926a8ff7afc89d6201c16 (patch) | |
tree | 935ddc2337b3891aab1ad7edcb06a62aabf14668 /src/declarative/qml/qmlenginedebug.cpp | |
parent | 5f63321e3fe2b436d469d2722dc464ea4c7830c4 (diff) | |
download | Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.zip Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.gz Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.bz2 |
Replace QmlList* and QList* support with a single QmlListProperty type
As a value type QmlListProperty doesn't consume any memory in the object.
It also has a companion QmlListReference class that is part of the public
API for C++ developers to interact with that also manages memory issues
that existed with previous solutions (if the containing QObject was
destroyed it left a dangling pointer).
Diffstat (limited to 'src/declarative/qml/qmlenginedebug.cpp')
-rw-r--r-- | src/declarative/qml/qmlenginedebug.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp index d3caa95..654157c 100644 --- a/src/declarative/qml/qmlenginedebug.cpp +++ b/src/declarative/qml/qmlenginedebug.cpp @@ -119,8 +119,7 @@ QmlEngineDebugServer::propertyData(QObject *obj, int propIdx) rv.type = QmlObjectProperty::Basic; } else if (QmlMetaType::isQObject(prop.userType())) { rv.type = QmlObjectProperty::Object; - } else if (QmlMetaType::isList(prop.userType()) || - QmlMetaType::isQmlList(prop.userType())) { + } else if (QmlMetaType::isList(prop.userType())) { rv.type = QmlObjectProperty::List; } @@ -133,14 +132,15 @@ QVariant QmlEngineDebugServer::valueContents(const QVariant &value) const if (QVariant::Type(userType) < QVariant::UserType) return value; - - if (QmlMetaType::isList(userType) || QmlMetaType::isQmlList(userType)) { + /* + if (QmlMetaType::isList(userType)) { int count = QmlMetaType::listCount(value); QVariantList contents; for (int i=0; i<count; i++) contents << valueContents(QmlMetaType::listAt(value, i)); return contents; - } else if (QmlMetaType::isQObject(userType)) { + } else */ + if (QmlMetaType::isQObject(userType)) { QObject *o = QmlMetaType::toQObject(value); if (o) { QString name = o->objectName(); |