| 89 | } |
| 90 | |
| 91 | static QString qmlListPropertyToString(const QVariant &value, bool *ok) |
| 92 | { |
| 93 | if (qstrncmp(value.typeName(), "QQmlListProperty<", 17) != 0 || !value.isValid()) |
| 94 | return QString(); |
| 95 | |
| 96 | *ok = true; |
| 97 | QQmlListProperty<QObject> *prop = reinterpret_cast<QQmlListProperty<QObject> *>(const_cast<void *>(value.data())); |
| 98 | if (!prop || !prop->count) |
| 99 | return QString(); |
| 100 | |
| 101 | const int count = prop->count(prop); |
| 102 | if (!count) |
| 103 | return QmlSupport::tr("<empty>"); |
| 104 | |
| 105 | return QmlSupport::tr("<%1 entries>").arg(count); |
| 106 | } |
| 107 | |
| 108 | static QString qjsValueToString(const QJSValue &v) |
| 109 | { |