summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-09 03:14:38 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-09 03:14:38 (GMT)
commit82e142d6b52153024bd05fa3a7853be7c64bb3bb (patch)
tree06d69a8612742dd6ab8d519baefc3f6355329fde /src/declarative/qml
parent65ebb736e7d1f134b6d3dc5c620de43b9880d544 (diff)
parent5e5ee991ad4261516cf099c9b237f8c72c9d49cc (diff)
downloadQt-82e142d6b52153024bd05fa3a7853be7c64bb3bb.zip
Qt-82e142d6b52153024bd05fa3a7853be7c64bb3bb.tar.gz
Qt-82e142d6b52153024bd05fa3a7853be7c64bb3bb.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlenginedebug.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp
index 2d8acf7..20d6fc1 100644
--- a/src/declarative/qml/qmlenginedebug.cpp
+++ b/src/declarative/qml/qmlenginedebug.cpp
@@ -99,6 +99,7 @@ QmlEngineDebugServer::QmlObjectProperty
QmlEngineDebugServer::propertyData(QObject *obj, int propIdx)
{
QmlObjectProperty rv;
+;
QMetaProperty prop = obj->metaObject()->property(propIdx);
@@ -165,7 +166,7 @@ void QmlEngineDebugServer::buildObjectDump(QDataStream &message,
int childrenCount = children.count();
for (int ii = 0; ii < children.count(); ++ii) {
- if (QmlBoundSignal::cast(children[ii]))
+ if (qobject_cast<QmlContext*>(children[ii]) || QmlBoundSignal::cast(children[ii]))
--childrenCount;
}
@@ -175,6 +176,8 @@ void QmlEngineDebugServer::buildObjectDump(QDataStream &message,
for (int ii = 0; ii < children.count(); ++ii) {
QObject *child = children.at(ii);
+ if (qobject_cast<QmlContext*>(child))
+ continue;
QmlBoundSignal *signal = QmlBoundSignal::cast(child);
if (signal) {
QmlObjectProperty prop;
@@ -271,10 +274,18 @@ QmlEngineDebugServer::objectData(QObject *object)
}
rv.objectName = object->objectName();
- rv.objectType = QString::fromUtf8(object->metaObject()->className());
rv.objectId = QmlDebugService::idForObject(object);
rv.contextId = QmlDebugService::idForObject(qmlContext(object));
+ QmlType *type = QmlMetaType::qmlType(object->metaObject());
+ if (type) {
+ QString typeName = type->qmlTypeName();
+ int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
+ rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1);
+ } else {
+ rv.objectType = QString::fromUtf8(object->metaObject()->className());
+ }
+
return rv;
}