summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlenginedebug.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp
index e20616a..1c7450a 100644
--- a/src/declarative/qml/qmlenginedebug.cpp
+++ b/src/declarative/qml/qmlenginedebug.cpp
@@ -318,7 +318,7 @@ void QmlEngineDebugServer::propertyChanged(int id, int objectId, const QByteArra
QByteArray reply;
QVariant v;
QDataStream rs(&reply, QIODevice::WriteOnly);
-
+
if (value.type() == QVariant::UserType || QmlMetaType::isObject(value.userType())) {
QObject *o = QmlMetaType::toQObject(value);
if (o) {
@@ -327,9 +327,15 @@ void QmlEngineDebugServer::propertyChanged(int id, int objectId, const QByteArra
objectName = QLatin1String("<unnamed>");
v = QString::fromUtf8(o->metaObject()->className()) +
QLatin1String(": ") + objectName;
+ } else {
+ v = QString::fromUtf8(value.typeName());
+ }
+ if (v.isNull()) {
+ QString s = value.toString();
+ if (s.isEmpty())
+ s = QLatin1String("<unknown>");
+ v = s;
}
- if (v.isNull())
- v = value.toString();
} else {
v = value;
}