summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlenginedebug.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-16 05:35:44 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-16 05:43:05 (GMT)
commit6fe6e803f08750534a6c14b4a2847a6ec1b29350 (patch)
tree78cfb1eab0de5f054c507d12376539c0740de4a4 /src/declarative/qml/qmlenginedebug.cpp
parente528394f428ba815fe61e4d2f5248b9bd11db375 (diff)
downloadQt-6fe6e803f08750534a6c14b4a2847a6ec1b29350.zip
Qt-6fe6e803f08750534a6c14b4a2847a6ec1b29350.tar.gz
Qt-6fe6e803f08750534a6c14b4a2847a6ec1b29350.tar.bz2
Use the component name as the base class name for dynamic meta objects
when appropriate. This allows for much improved debug presentation. e.g. what used to be shown as "QmlGraphicsRectangle_QML_3" can now be show as "MyComponent".
Diffstat (limited to 'src/declarative/qml/qmlenginedebug.cpp')
-rw-r--r--src/declarative/qml/qmlenginedebug.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp
index 6cb57b2..46490fb 100644
--- a/src/declarative/qml/qmlenginedebug.cpp
+++ b/src/declarative/qml/qmlenginedebug.cpp
@@ -285,6 +285,9 @@ QmlEngineDebugServer::objectData(QObject *object)
rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1);
} else {
rv.objectType = QString::fromUtf8(object->metaObject()->className());
+ int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_"));
+ if (marker != -1)
+ rv.objectType = rv.objectType.left(marker);
}
return rv;