| 95 | |
| 96 | namespace GammaRay { |
| 97 | static QString stringifyProperty(const QObject *obj, const QString &propName) |
| 98 | { |
| 99 | const QVariant value = obj->property(propName.toLatin1()); |
| 100 | const QMetaProperty mp = obj->metaObject()->property( |
| 101 | obj->metaObject()->indexOfProperty(propName.toLatin1())); |
| 102 | if (mp.isValid()) { |
| 103 | const QString enumStr = EnumUtil::enumToString(value, mp.typeName(), obj->metaObject()); |
| 104 | if (!enumStr.isEmpty()) |
| 105 | return enumStr; |
| 106 | } |
| 107 | return VariantHandler::displayString(value); |
| 108 | } |
| 109 | |
| 110 | struct IconCacheEntry |
| 111 | { |
no test coverage detected