MCPcopy Create free account
hub / github.com/KDAB/GammaRay / data

Method data

core/objectenummodel.cpp:48–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48QVariant ObjectEnumModel::data(const QModelIndex &index, int role) const
49{
50 if (!index.parent().isValid())
51 return SuperClass::data(index, role);
52
53 if (role == Qt::DisplayRole) {
54 const QMetaEnum e = m_metaObject->enumerator(index.parent().row());
55 if (index.column() == 0)
56 return e.key(index.row());
57 if (index.column() == 1)
58 return e.value(index.row());
59 }
60
61 return QVariant();
62}
63
64QVariant ObjectEnumModel::metaData(const QModelIndex &index, const QMetaEnum &enumerator,
65 int role) const

Callers

nothing calls this directly

Calls 7

rowMethod · 0.80
columnMethod · 0.80
keyMethod · 0.80
QVariantClass · 0.70
isValidMethod · 0.45
parentMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected