MCPcopy Create free account
hub / github.com/YACReader/yacreader / index

Method index

YACReaderLibrary/db/folder_model.cpp:455–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455QModelIndex FolderModel::index(int row, int column, const QModelIndex &parent)
456 const
457{
458 if (!hasIndex(row, column, parent))
459 return QModelIndex();
460
461 FolderItem *parentItem;
462
463 if (!parent.isValid())
464 parentItem = rootItem;
465 else
466 parentItem = static_cast<FolderItem *>(parent.internalPointer());
467
468 FolderItem *childItem = parentItem->child(row);
469 if (childItem)
470 return createIndex(row, column, childItem);
471 else
472 return QModelIndex();
473}
474
475QModelIndex FolderModel::index(qulonglong folderId) const
476{

Callers

nothing calls this directly

Calls 3

QModelIndexClass · 0.50
isValidMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected