MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / parent

Method parent

src/plugins/binarytools/models/binarytoolsmodel.cpp:90–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90QModelIndex BinaryToolsModel::parent(const QModelIndex &child) const
91{
92 if (auto tool = toolForIndex(child)) {
93 int groupIndex = 0;
94 for (const auto &toolsInGroup : binaryTools) {
95 if (toolsInGroup.contains(*tool))
96 return index(groupIndex, 0);
97 ++groupIndex;
98 }
99 }
100 return QModelIndex();
101}
102
103int BinaryToolsModel::rowCount(const QModelIndex &parent) const
104{

Callers 4

handleRemoveMethod · 0.45
drawToolItemMethod · 0.45
groupForIndexMethod · 0.45
addToolMethod · 0.45

Calls 2

QModelIndexClass · 0.50
containsMethod · 0.45

Tested by

no test coverage detected