MCPcopy Create free account
hub / github.com/cc20110101/RedisView / indexFromItem

Method indexFromItem

src/RedisView/Model/KeyTreeModel.cpp:129–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129QModelIndex KeyTreeModel::indexFromItem(const KeyTreeItem *item) const {
130 if(!item || item == rootItem)
131 return QModelIndex();
132
133 return createIndex(item->childNumber(), 0, const_cast<KeyTreeItem *>(item));
134}
135
136KeyTreeItem *KeyTreeModel::getItem(const QModelIndex &index) const
137{

Callers 1

countMethod · 0.80

Calls 1

childNumberMethod · 0.45

Tested by

no test coverage detected