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

Method removeTool

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

Source from the content-addressed store, hash-verified

233}
234
235void BinaryToolsModel::removeTool(const QModelIndex &index)
236{
237 auto tool = toolForIndex(index);
238 int groupIndex = 0;
239 for (auto &items : binaryTools) {
240 int pos = items.indexOf(*tool);
241 if (pos != -1) {
242 beginRemoveRows(this->index(groupIndex, 0), pos, pos);
243 items.removeAt(pos);
244 endRemoveRows();
245 break;
246 }
247 ++groupIndex;
248 }
249}
250
251void BinaryToolsModel::removeGroup(const QModelIndex &index)
252{

Callers 1

handleRemoveMethod · 0.80

Calls 2

indexMethod · 0.95
indexOfMethod · 0.45

Tested by

no test coverage detected