diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-15 12:12:22 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-31 08:30:56 +0000 |
commit | 9b4d31825e5f76e91af555549223ea6b33dd37e6 (patch) | |
tree | 47a8d363f4dee6cf8be7257b8255bb861566559d /src/plugins | |
parent | da6fd9c762561d41ce3372c98a555771d18241d6 (diff) |
Qml Debugger: Make sure all objects have a type
QQmlMetaType::prettyTypeName() does a better job in finding a valid type
name for our objects than we can do ourselves.
Task-number: QTCREATORBUG-17741
Change-Id: Ie8a192aceb230e73b5295b745987692548aff641
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp index 151e44c4d4..3fb0522cd1 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp @@ -409,18 +409,7 @@ QQmlEngineDebugServiceImpl::objectData(QObject *object) rv.objectId = QQmlDebugService::idForObject(object); rv.contextId = QQmlDebugService::idForObject(qmlContext(object)); rv.parentId = QQmlDebugService::idForObject(object->parent()); - QQmlType *type = QQmlMetaType::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()); - int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_")); - if (marker != -1) - rv.objectType = rv.objectType.left(marker); - } - + rv.objectType = QQmlMetaType::prettyTypeName(object); return rv; } |