| 97 | MetaObjectRegistry::~MetaObjectRegistry() = default; |
| 98 | |
| 99 | QVariant MetaObjectRegistry::data(const QMetaObject *metaObject, MetaObjectData type) const |
| 100 | { |
| 101 | switch (type) { |
| 102 | case ClassName: |
| 103 | return m_metaObjectInfoMap.value(metaObject).className; |
| 104 | case Valid: |
| 105 | return isValid(metaObject); |
| 106 | case SelfCount: |
| 107 | if (inheritsQObject(metaObject)) |
| 108 | return m_metaObjectInfoMap.value(metaObject).selfCount; |
| 109 | return QStringLiteral("-"); |
| 110 | case InclusiveCount: |
| 111 | if (inheritsQObject(metaObject)) |
| 112 | return m_metaObjectInfoMap.value(metaObject).inclusiveCount; |
| 113 | return QStringLiteral("-"); |
| 114 | case SelfAliveCount: |
| 115 | if (inheritsQObject(metaObject)) |
| 116 | return m_metaObjectInfoMap.value(metaObject).selfAliveCount; |
| 117 | return QStringLiteral("-"); |
| 118 | case InclusiveAliveCount: |
| 119 | if (inheritsQObject(metaObject)) |
| 120 | return m_metaObjectInfoMap.value(metaObject).inclusiveAliveCount; |
| 121 | return QStringLiteral("-"); |
| 122 | } |
| 123 | return QVariant(); |
| 124 | } |
| 125 | |
| 126 | bool MetaObjectRegistry::isValid(const QMetaObject *metaObject) const |
| 127 | { |
no test coverage detected