MCPcopy Create free account
hub / github.com/baldurk/renderdoc / GetDepth

Function GetDepth

qrenderdoc/Widgets/Extended/RDTreeView.cpp:43–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#include "Code/Resources.h"
42
43static int GetDepth(const QAbstractItemModel *model, const QModelIndex &idx)
44{
45 if(idx == QModelIndex())
46 return 0;
47
48 return 1 + GetDepth(model, model->parent(idx));
49}
50
51static bool CompareModelIndex(const QModelIndex &a, const QModelIndex &b)
52{

Callers 2

CompareModelIndexFunction · 0.85
copySelectionMethod · 0.85

Calls 2

QModelIndexClass · 0.50
parentMethod · 0.45

Tested by

no test coverage detected